Contract for a Doctrine persistence layer ObjectRepository class to implement.
@license http://www.opensource.org/licenses/lgpl-license.php LGPL @link www.doctrine-project.org @since 2.1 @author Benjamin Eberlei <kontakt@beberlei.de> @author Jonathan Wage <jonwage@gmail.com>
Expanded class hierarchy of ObjectRepository
All classes that implement ObjectRepository
interface ObjectRepository {
/**
* Finds an object by its primary key / identifier.
*
* @param int $id The identifier.
* @return object The object.
*/
function find($id);
/**
* Finds all objects in the repository.
*
* @return mixed The objects.
*/
function findAll();
/**
* Finds objects by a set of criteria.
*
* 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.
*
* @throws \UnexpectedValueException
* @param array $criteria
* @param array|null $orderBy
* @param int|null $limit
* @param int|null $offset
* @return mixed The objects.
*/
function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null);
/**
* Finds a single object by a set of criteria.
*
* @param array $criteria
* @return object The object.
*/
function findOneBy(array $criteria);
/**
* Returns the class name of the object managed by the repository
*
* @return string
*/
function getClassName();
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ObjectRepository:: |
function | Finds an object by its primary key / identifier. | ||
ObjectRepository:: |
function | Finds all objects in the repository. | ||
ObjectRepository:: |
function | Finds objects by a set of criteria. | ||
ObjectRepository:: |
function | Finds a single object by a set of criteria. | ||
ObjectRepository:: |
function | Returns the class name of the object managed by the repository |