The entities. */ public function findAll(); /** * Finds entities by a set of criteria. * * @param int|null $limit * @param int|null $offset * @psalm-param array $criteria * @psalm-param array|null $orderBy * * @psalm-return list The objects. */ public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null); /** * Finds a single entity by a set of criteria. * * @psalm-param array $criteria * @psalm-param array|null $orderBy * * @return object|null The entity instance or NULL if the entity can not be found. * @psalm-return ?T */ public function findOneBy(array $criteria, ?array $orderBy = null); /** * Counts entities by a set of criteria. * * @psalm-param array $criteria * * @return int The cardinality of the objects that match the given criteria. * * @todo Add this method to `ObjectRepository` interface in the next major release */ public function count(array $criteria); /** * @return string */ public function getClassName(); /** * Select all elements from a selectable that match the expression and * return a new collection containing these elements. * * @return LazyCriteriaCollection * @psalm-return Collection */ public function matching(Criteria $criteria); }