DefaultPersistenceFacade Class Reference

Detailed Description

Default PersistenceFacade implementation.

Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

Definition at line 32 of file DefaultPersistenceFacade.php.

+ Inheritance diagram for DefaultPersistenceFacade:

Public Member Functions

 __construct (EventManager $eventManager, OutputStrategy $logStrategy)
 
 __destruct ()
 
 setMappers ($mappers)
 
 getKnownTypes ()
 
 isKnownType ($type)
 
 getFullyQualifiedType ($type)
 
 getSimpleType ($type)
 
 load (ObjectId $oid, $buildDepth=BuildDepth::SINGLE)
 
 create ($type, $buildDepth=BuildDepth::SINGLE)
 
 getLastCreatedOID ($type)
 
 getOIDs ($type, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null)
 
 getFirstOID ($type, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null)
 
 loadObjects ($typeOrTypes, $buildDepth=BuildDepth::SINGLE, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null)
 
 loadFirstObject ($typeOrTypes, $buildDepth=BuildDepth::SINGLE, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null)
 
 getTransaction ()
 
 getMapper ($type)
 
 setMapper ($type, PersistenceMapper $mapper)
 
 stateChanged (StateChangeEvent $event)
 

Protected Member Functions

 calculateSimpleType ($type)
 
 getCacheKey ($typeOrTypes, $buildDepth, $criteriaArray=null, $orderArray=null, PagingInfo $pagingInfo=null)
 

Constructor & Destructor Documentation

__construct ( EventManager  $eventManager,
OutputStrategy  $logStrategy 
)

Constructor.

Parameters
$eventManager
$logStrategyOutputStrategy used for logging persistence actions.

Definition at line 46 of file DefaultPersistenceFacade.php.

__destruct ( )

Destructor.

Definition at line 58 of file DefaultPersistenceFacade.php.

Member Function Documentation

setMappers (   $mappers)

Set the PersistentMapper instances.

Parameters
$mappersAssociative array with the fully qualified mapped class names as keys and the mapper instances as values

Definition at line 68 of file DefaultPersistenceFacade.php.

getKnownTypes ( )
isKnownType (   $type)
See also
PersistenceFacade::isKnownType()

Implements PersistenceFacade.

Definition at line 99 of file DefaultPersistenceFacade.php.

getFullyQualifiedType (   $type)
getSimpleType (   $type)
load ( ObjectId  $oid,
  $buildDepth = BuildDepth::SINGLE 
)
See also
PersistenceFacade::load()

Implements PersistenceFacade.

Definition at line 130 of file DefaultPersistenceFacade.php.

create (   $type,
  $buildDepth = BuildDepth::SINGLE 
)
See also
PersistenceFacade::create()

Implements PersistenceFacade.

Definition at line 149 of file DefaultPersistenceFacade.php.

getLastCreatedOID (   $type)
getOIDs (   $type,
  $criteria = null,
  $orderby = null,
PagingInfo  $pagingInfo = null 
)
See also
PersistenceFacade::getOIDs()

Implements PersistenceFacade.

Definition at line 177 of file DefaultPersistenceFacade.php.

getFirstOID (   $type,
  $criteria = null,
  $orderby = null,
PagingInfo  $pagingInfo = null 
)
loadObjects (   $typeOrTypes,
  $buildDepth = BuildDepth::SINGLE,
  $criteria = null,
  $orderby = null,
PagingInfo  $pagingInfo = null 
)
loadFirstObject (   $typeOrTypes,
  $buildDepth = BuildDepth::SINGLE,
  $criteria = null,
  $orderby = null,
PagingInfo  $pagingInfo = null 
)
getTransaction ( )
getMapper (   $type)
See also
PersistenceFacade::getMapper()

Implements PersistenceFacade.

Definition at line 330 of file DefaultPersistenceFacade.php.

setMapper (   $type,
PersistenceMapper  $mapper 
)
See also
PersistenceFacade::setMapper()

Implements PersistenceFacade.

Definition at line 343 of file DefaultPersistenceFacade.php.

stateChanged ( StateChangeEvent  $event)

Listen to StateChangeEvents.

Parameters
$eventStateChangeEvent instance

Definition at line 376 of file DefaultPersistenceFacade.php.

calculateSimpleType (   $type)
protected

Calculate the simple type name for a given fully qualified type name.

Parameters
$typeType name with namespace
Returns
Simple type name (without namespace)

Definition at line 395 of file DefaultPersistenceFacade.php.

getCacheKey (   $typeOrTypes,
  $buildDepth,
  $criteriaArray = null,
  $orderArray = null,
PagingInfo  $pagingInfo = null 
)
protected

Get a unique string for the given parameter values.

Parameters
$typeOrTypes
$buildDepth
$criteriaArray
$orderArray
$pagingInfo
Returns
String

Definition at line 412 of file DefaultPersistenceFacade.php.