PHP Class Scalr\Service\Aws\AbstractRepository

Since: 03.10.2012
Author: Vitaliy Demidov ([email protected])
Mostra file Open project: scalr/scalr Class Usage Examples

Public Methods

Method Description
__construct ( Scalr\Service\Aws\EntityManager $em )
find ( string $id ) : object | null Finds one element in entity manager by its id
findBy ( array $criteria ) : ArrayObject Finds elements by required criteria.
findOneBy ( array $criteria ) : object | null Finds one element by required criteria.
getEntityManager ( ) : Scalr\Service\Aws\EntityManager Gets an EntityManager
getIdentifier ( ) : string | array Gets an identifier name(s)
getReflectionClassName ( ) : string Gets reflection class name.

Method Details

__construct() public method

public __construct ( Scalr\Service\Aws\EntityManager $em )
$em Scalr\Service\Aws\EntityManager

find() public method

Finds one element in entity manager by its id
public find ( string $id ) : object | null
$id string Element Id (Public property of entity)
return object | null Returns one object or NULL if nothing found.

findBy() public method

Finds elements by required criteria.
public findBy ( array $criteria ) : ArrayObject
$criteria array An assoc array with search query. It looks like array (propertyname => value)
return ArrayObject Returns an list of entities which match criteria.

findOneBy() public method

Finds one element by required criteria.
public findOneBy ( array $criteria ) : object | null
$criteria array An assoc array with search query. It looks like array (propertyname => value)
return object | null Returns an entity or null if nothing found.

getEntityManager() public method

Gets an EntityManager
public getEntityManager ( ) : Scalr\Service\Aws\EntityManager
return Scalr\Service\Aws\EntityManager

getIdentifier() abstract public method

Gets an identifier name(s)
abstract public getIdentifier ( ) : string | array
return string | array Returns the Identifier

getReflectionClassName() abstract public method

The name of the class that represents entity object.
abstract public getReflectionClassName ( ) : string
return string Returns reflection class name