PHP Interface Bravo3\Orm\Services\Cache\EntityCachingInterface

Show file Open project: bravo3/orm Interface Usage Examples

Public Methods

Method Description
exists ( string $class_name, string $id ) : boolean Check if an entity exists in cache
purge ( string $class_name, string $id ) : void Purge an entity from cache
retrieve ( string $class_name, string $id ) : object Retrieve an entity from the cache
store ( string $class_name, string $id, object $entity ) : void Store an entity in cache

Method Details

exists() public method

Check if an entity exists in cache
public exists ( string $class_name, string $id ) : boolean
$class_name string
$id string
return boolean

purge() public method

If the entity does not exist, nothing will happen.
public purge ( string $class_name, string $id ) : void
$class_name string
$id string
return void

retrieve() public method

If an entity does not exist, a NotFoundException will be thrown.
public retrieve ( string $class_name, string $id ) : object
$class_name string
$id string
return object

store() public method

Store an entity in cache
public store ( string $class_name, string $id, object $entity ) : void
$class_name string
$id string
$entity object
return void