Detailed Description
RemoteCapablePersistenceFacade delegates local persistence operations to the default PersistenceFacadeImpl and remote operations to a remote server.
Definition at line 33 of file RemoteCapablePersistenceFacade.php.
 Inheritance diagram for RemoteCapablePersistenceFacade:
 Inheritance diagram for RemoteCapablePersistenceFacade:| Public Member Functions | |
| __construct (EventManager $eventManager, OutputStrategy $logStrategy, Session $session) | |
| setResolveProxies ($isResolvingProxies) | |
| isResolvingProxies () | |
| setTranslatingValues ($isTranslatingValues) | |
| isTranslatingValues () | |
| load (ObjectId $oid, $buildDepth=BuildDepth::SINGLE) | |
| create ($type, $buildDepth=BuildDepth::SINGLE) | |
| getOIDs ($type, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null) | |
| loadObjects ($type, $buildDepth=BuildDepth::SINGLE, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null) | |
|  Public Member Functions inherited from DefaultPersistenceFacade | |
| __construct (EventManager $eventManager, OutputStrategy $logStrategy) | |
| __destruct () | |
| setMappers ($mappers) | |
| getKnownTypes () | |
| isKnownType ($type) | |
| getFullyQualifiedType ($type) | |
| getSimpleType ($type) | |
| getLastCreatedOID ($type) | |
| getFirstOID ($type, $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) | |
| Public Attributes | |
| const | PROXY_OBJECTS_SESSION_VARNAME = 'RemoteCapablePersistenceFacadeImpl.proxyObjects' | 
| const | REMOTE_OBJECTS_SESSION_VARNAME = 'RemoteCapablePersistenceFacadeImpl.remoteObjects' | 
| Protected Member Functions | |
| getProxyObject (ObjectId $umi, $buildDepth) | |
| loadRemoteObject (ObjectId $umi, $buildDepth) | |
| registerProxyObject (ObjectID $umi, PersistentObject $obj, $buildDepth) | |
| registerRemoteObject (ObjectId $umi, PersistentObject $obj, $buildDepth) | |
| registerObject (ObjectId $umi, PersistentObject $obj, $buildDepth, $varName) | |
| getRegisteredProxyObject (ObjectId $umi, $buildDepth) | |
| getRegisteredRemoteObject (ObjectId $umi, $buildDepth) | |
| getRegisteredObject (ObjectId $umi, $buildDepth, $varName) | |
| makeUmis ($oids, $umiPrefix) | |
|  Protected Member Functions inherited from DefaultPersistenceFacade | |
| calculateSimpleType ($type) | |
Constructor & Destructor Documentation
◆ __construct()
| __construct | ( | EventManager | $eventManager, | 
| OutputStrategy | $logStrategy, | ||
| Session | $session | ||
| ) | 
Constructor.
- Parameters
- 
  $eventManager $logStrategy $session 
Definition at line 53 of file RemoteCapablePersistenceFacade.php.
Member Function Documentation
◆ setResolveProxies()
| setResolveProxies | ( | $isResolvingProxies | ) | 
Tell the PersistenceFacade implementation to resolve proxies or not.
- Parameters
- 
  $isResolvingProxies Boolean whether proxies should be resolved or not 
Definition at line 78 of file RemoteCapablePersistenceFacade.php.
◆ isResolvingProxies()
| isResolvingProxies | ( | ) | 
Check if the PersistenceFacade implementation is resolving proxies or not.
- Returns
- Boolean whether proxies are resolved or not
Definition at line 86 of file RemoteCapablePersistenceFacade.php.
◆ setTranslatingValues()
| setTranslatingValues | ( | $isTranslatingValues | ) | 
Tell the PersistenceFacade implementation to translate remote values or not.
- Parameters
- 
  $isTranslatingValues Boolean whether values should be translated or not 
Definition at line 94 of file RemoteCapablePersistenceFacade.php.
◆ isTranslatingValues()
| isTranslatingValues | ( | ) | 
Check if the PersistenceFacade implementation is translating remote values or not.
- Returns
- Boolean whether values are tanslated or not
Definition at line 102 of file RemoteCapablePersistenceFacade.php.
◆ load()
| load | ( | ObjectId | $oid, | 
| $buildDepth = BuildDepth::SINGLE | |||
| ) | 
- See also
- PersistenceFacade::load()
Reimplemented from DefaultPersistenceFacade.
Definition at line 109 of file RemoteCapablePersistenceFacade.php.
◆ create()
| create | ( | $type, | |
| $buildDepth = BuildDepth::SINGLE | |||
| ) | 
- See also
- PersistenceFacade::create()
Reimplemented from DefaultPersistenceFacade.
Definition at line 130 of file RemoteCapablePersistenceFacade.php.
◆ getOIDs()
| getOIDs | ( | $type, | |
| $criteria = null, | |||
| $orderby = null, | |||
| PagingInfo | $pagingInfo = null | ||
| ) | 
- See also
- PersistenceFacade::getOIDs()
Reimplemented from DefaultPersistenceFacade.
Definition at line 138 of file RemoteCapablePersistenceFacade.php.
◆ loadObjects()
| loadObjects | ( | $type, | |
| $buildDepth = BuildDepth::SINGLE, | |||
| $criteria = null, | |||
| $orderby = null, | |||
| PagingInfo | $pagingInfo = null | ||
| ) | 
- See also
- PersistenceFacade::loadObjects()
Reimplemented from DefaultPersistenceFacade.
Definition at line 146 of file RemoteCapablePersistenceFacade.php.
◆ getProxyObject()
| 
 | protected | 
Get the proxy object for a remote object.
This method makes sure that a proxy for the given remote object exists. If it does not exist, it will be created.
- Parameters
- 
  $umi The universal model id (oid with server prefix) $buildDepth buildDepth One of the BUILDDEPTH constants or a number describing the number of generations to build (except BuildDepth::REQUIRED) 
- Returns
- The proxy object.
Definition at line 172 of file RemoteCapablePersistenceFacade.php.
◆ loadRemoteObject()
| 
 | protected | 
Load the real subject of a proxy from the remote instance.
- Parameters
- 
  $umi The universal model id (oid with server prefix) $buildDepth buildDepth One of the BUILDDEPTH constants or a number describing the number of generations to build (except BuildDepth::REQUIRED) 
Definition at line 214 of file RemoteCapablePersistenceFacade.php.
◆ registerProxyObject()
| 
 | protected | 
Save a proxy object in the session.
- Parameters
- 
  $umi The universal model id (oid with server prefix) $obj The proxy object. $buildDepth The depth the object was loaded. 
Definition at line 297 of file RemoteCapablePersistenceFacade.php.
◆ registerRemoteObject()
| 
 | protected | 
Save a remote object in the session.
- Parameters
- 
  $umi The universal model id (oid with server prefix) $obj The remote object. $buildDepth The depth the object was loaded. 
Definition at line 312 of file RemoteCapablePersistenceFacade.php.
◆ registerObject()
| 
 | protected | 
Save a object in the given session variable.
- Parameters
- 
  $umi The universal model id (oid with server prefix) $obj The object to register. $buildDepth The depth the object was loaded. $varName The session variable name. 
Definition at line 324 of file RemoteCapablePersistenceFacade.php.
◆ getRegisteredProxyObject()
| 
 | protected | 
Get a proxy object from the session.
- Parameters
- 
  $umi The universal model id (oid with server prefix) $buildDepth The requested build depth. 
- Returns
- The proxy object or null if not found.
Definition at line 344 of file RemoteCapablePersistenceFacade.php.
◆ getRegisteredRemoteObject()
| 
 | protected | 
Get a remote object from the session.
- Parameters
- 
  $umi The universal model id (oid with server prefix) $buildDepth The requested build depth. 
- Returns
- The remote object or null if not found.
Definition at line 355 of file RemoteCapablePersistenceFacade.php.
◆ getRegisteredObject()
| 
 | protected | 
Get a object from the given session variable.
- Parameters
- 
  $umi The universal model id (oid with server prefix) $buildDepth The requested build depth. $varName The session variable name 
- Returns
- The object or null if not found.
Definition at line 367 of file RemoteCapablePersistenceFacade.php.
◆ makeUmis()
| 
 | protected | 
Replace all object ids in an array with the umis according to the given umiPrefix.
- Parameters
- 
  $oids The array of oids $umiPrefix The umi prefix 
- Returns
- The array of umis
Definition at line 395 of file RemoteCapablePersistenceFacade.php.
Member Data Documentation
◆ PROXY_OBJECTS_SESSION_VARNAME
| const PROXY_OBJECTS_SESSION_VARNAME = 'RemoteCapablePersistenceFacadeImpl.proxyObjects' | 
Definition at line 36 of file RemoteCapablePersistenceFacade.php.
◆ REMOTE_OBJECTS_SESSION_VARNAME
| const REMOTE_OBJECTS_SESSION_VARNAME = 'RemoteCapablePersistenceFacadeImpl.remoteObjects' | 
Definition at line 37 of file RemoteCapablePersistenceFacade.php.