Detailed Description
Default PersistenceFacade implementation.
Definition at line 35 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) | |
Constructor & Destructor Documentation
◆ __construct()
| __construct | ( | EventManager | $eventManager, |
| OutputStrategy | $logStrategy | ||
| ) |
Constructor.
- Parameters
-
$eventManager $logStrategy OutputStrategy used for logging persistence actions.
Definition at line 49 of file DefaultPersistenceFacade.php.
◆ __destruct()
| __destruct | ( | ) |
Destructor.
Definition at line 61 of file DefaultPersistenceFacade.php.
Member Function Documentation
◆ setMappers()
| setMappers | ( | $mappers | ) |
Set the PersistentMapper instances.
- Parameters
-
$mappers Associative array with the fully qualified mapped class names as keys and the mapper instances as values
Definition at line 71 of file DefaultPersistenceFacade.php.
◆ getKnownTypes()
| getKnownTypes | ( | ) |
Implements PersistenceFacade.
Definition at line 95 of file DefaultPersistenceFacade.php.
◆ isKnownType()
| isKnownType | ( | $type | ) |
- See also
- PersistenceFacade::isKnownType()
Implements PersistenceFacade.
Definition at line 102 of file DefaultPersistenceFacade.php.
◆ getFullyQualifiedType()
| getFullyQualifiedType | ( | $type | ) |
Implements PersistenceFacade.
Definition at line 109 of file DefaultPersistenceFacade.php.
◆ getSimpleType()
| getSimpleType | ( | $type | ) |
Implements PersistenceFacade.
Definition at line 122 of file DefaultPersistenceFacade.php.
◆ load()
| load | ( | ObjectId | $oid, |
$buildDepth = BuildDepth::SINGLE |
|||
| ) |
- See also
- PersistenceFacade::load()
Implements PersistenceFacade.
Reimplemented in RemoteCapablePersistenceFacade.
Definition at line 133 of file DefaultPersistenceFacade.php.
◆ create()
| create | ( | $type, | |
$buildDepth = BuildDepth::SINGLE |
|||
| ) |
- See also
- PersistenceFacade::create()
Implements PersistenceFacade.
Reimplemented in RemoteCapablePersistenceFacade.
Definition at line 152 of file DefaultPersistenceFacade.php.
◆ getLastCreatedOID()
| getLastCreatedOID | ( | $type | ) |
Implements PersistenceFacade.
Definition at line 169 of file DefaultPersistenceFacade.php.
◆ getOIDs()
| getOIDs | ( | $type, | |
$criteria = null, |
|||
$orderby = null, |
|||
| PagingInfo | $pagingInfo = null |
||
| ) |
- See also
- PersistenceFacade::getOIDs()
Implements PersistenceFacade.
Reimplemented in RemoteCapablePersistenceFacade.
Definition at line 180 of file DefaultPersistenceFacade.php.
◆ getFirstOID()
| getFirstOID | ( | $type, | |
$criteria = null, |
|||
$orderby = null, |
|||
| PagingInfo | $pagingInfo = null |
||
| ) |
- See also
- PersistenceFacade::getFirstOID()
Implements PersistenceFacade.
Definition at line 192 of file DefaultPersistenceFacade.php.
◆ loadObjects()
| loadObjects | ( | $typeOrTypes, | |
$buildDepth = BuildDepth::SINGLE, |
|||
$criteria = null, |
|||
$orderby = null, |
|||
| PagingInfo | $pagingInfo = null |
||
| ) |
- See also
- PersistenceFacade::loadObjects()
Implements PersistenceFacade.
Reimplemented in RemoteCapablePersistenceFacade.
Definition at line 208 of file DefaultPersistenceFacade.php.
◆ loadFirstObject()
| loadFirstObject | ( | $typeOrTypes, | |
$buildDepth = BuildDepth::SINGLE, |
|||
$criteria = null, |
|||
$orderby = null, |
|||
| PagingInfo | $pagingInfo = null |
||
| ) |
Implements PersistenceFacade.
Definition at line 227 of file DefaultPersistenceFacade.php.
◆ getTransaction()
| getTransaction | ( | ) |
Implements PersistenceFacade.
Definition at line 243 of file DefaultPersistenceFacade.php.
◆ getMapper()
| getMapper | ( | $type | ) |
- See also
- PersistenceFacade::getMapper()
Implements PersistenceFacade.
Definition at line 253 of file DefaultPersistenceFacade.php.
◆ setMapper()
| setMapper | ( | $type, | |
| PersistenceMapper | $mapper | ||
| ) |
- See also
- PersistenceFacade::setMapper()
Implements PersistenceFacade.
Definition at line 266 of file DefaultPersistenceFacade.php.
◆ stateChanged()
| stateChanged | ( | StateChangeEvent | $event | ) |
Listen to StateChangeEvents.
- Parameters
-
$event StateChangeEvent instance
Definition at line 299 of file DefaultPersistenceFacade.php.
◆ calculateSimpleType()
|
protected |
Calculate the simple type name for a given fully qualified type name.
- Parameters
-
$type Type name with namespace
- Returns
- Simple type name (without namespace)
Definition at line 318 of file DefaultPersistenceFacade.php.