PHP Интерфейс Doctrine\Common\Persistence\ObjectRepository

С версии: 2.1
Автор: Benjamin Eberlei ([email protected])
Автор: Jonathan Wage ([email protected])
Показать файл Открыть проект Примеры использования интерфейса

Открытые методы

Метод Описание
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.

Описание методов

find() публичный метод

Finds an object by its primary key / identifier.
public find ( mixed $id ) : object | null
$id mixed The identifier.
Результат object | null The object.

findAll() публичный метод

Finds all objects in the repository.
public findAll ( ) : array
Результат array The objects.

findBy() публичный метод

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
Результат array The objects.

findOneBy() публичный метод

Finds a single object by a set of criteria.
public findOneBy ( array $criteria ) : object | null
$criteria array The criteria.
Результат object | null The object.

getClassName() публичный метод

Returns the class name of the object managed by the repository.
public getClassName ( ) : string
Результат string