PHP Interface Doctrine\Common\Persistence\ObjectRepository

Since: 2.1
Author: Benjamin Eberlei ([email protected])
Author: Jonathan Wage ([email protected])
Afficher le fichier Open project: doctrine/common Interface Usage Examples

Méthodes publiques

Méthode Description
find ( mixed $id ) : object | null Finds an object by its primary key / identifier.
findAll ( ) : array Finds all objects in the repository.
findBy ( array $criteria, array $orderBy = null, integer | null $limit = null, integer | null $offset = null ) : array Finds objects by a set of criteria.
findOneBy ( array $criteria ) : object | null Finds a single object by a set of criteria.
getClassName ( ) : string Returns the class name of the object managed by the repository.

Method Details

find() public méthode

Finds an object by its primary key / identifier.
public find ( mixed $id ) : object | null
$id mixed The identifier.
Résultat object | null The object.

findAll() public méthode

Finds all objects in the repository.
public findAll ( ) : array
Résultat array The objects.

findBy() public méthode

Optionally sorting and limiting details can be passed. An implementation may throw an UnexpectedValueException if certain values of the sorting or limiting details are not supported.
public findBy ( array $criteria, array $orderBy = null, integer | null $limit = null, integer | null $offset = null ) : array
$criteria array
$orderBy array
$limit integer | null
$offset integer | null
Résultat array The objects.

findOneBy() public méthode

Finds a single object by a set of criteria.
public findOneBy ( array $criteria ) : object | null
$criteria array The criteria.
Résultat object | null The object.

getClassName() public méthode

Returns the class name of the object managed by the repository.
public getClassName ( ) : string
Résultat string