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.
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) | |
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 ($type, $buildDepth=BuildDepth::SINGLE, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null) | |
loadFirstObject ($type, $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) | |
Constructor & Destructor Documentation
__construct | ( | EventManager | $eventManager, |
OutputStrategy | $logStrategy, | ||
Session | $session | ||
) |
Constructor.
- Parameters
-
$eventManager $logStrategy $session
Definition at line 52 of file RemoteCapablePersistenceFacade.php.
Member Function Documentation
setResolveProxies | ( | $isResolvingProxies | ) |
Tell the PersistenceFacade implementation to resolve proxies or not.
- Parameters
-
$isResolvingProxies Boolean whether proxies should be resolved or not
Definition at line 77 of file RemoteCapablePersistenceFacade.php.
isResolvingProxies | ( | ) |
Check if the PersistenceFacade implementation is resolving proxies or not.
- Returns
- Boolean whether proxies are resolved or not
Definition at line 85 of file RemoteCapablePersistenceFacade.php.
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 93 of file RemoteCapablePersistenceFacade.php.
isTranslatingValues | ( | ) |
Check if the PersistenceFacade implementation is translating remote values or not.
- Returns
- Boolean whether values are tanslated or not
Definition at line 101 of file RemoteCapablePersistenceFacade.php.
load | ( | ObjectId | $oid, |
$buildDepth = BuildDepth::SINGLE |
|||
) |
- See also
- PersistenceFacade::load()
Implements PersistenceFacade.
Definition at line 108 of file RemoteCapablePersistenceFacade.php.
create | ( | $type, | |
$buildDepth = BuildDepth::SINGLE |
|||
) |
- See also
- PersistenceFacade::create()
Implements PersistenceFacade.
Definition at line 129 of file RemoteCapablePersistenceFacade.php.
getOIDs | ( | $type, | |
$criteria = null , |
|||
$orderby = null , |
|||
PagingInfo | $pagingInfo = null |
||
) |
- See also
- PersistenceFacade::getOIDs()
Implements PersistenceFacade.
Definition at line 137 of file RemoteCapablePersistenceFacade.php.
loadObjects | ( | $type, | |
$buildDepth = BuildDepth::SINGLE , |
|||
$criteria = null , |
|||
$orderby = null , |
|||
PagingInfo | $pagingInfo = null |
||
) |
- See also
- PersistenceFacade::loadObjects()
Implements PersistenceFacade.
Definition at line 145 of file RemoteCapablePersistenceFacade.php.
|
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 171 of file RemoteCapablePersistenceFacade.php.
|
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 213 of file RemoteCapablePersistenceFacade.php.
|
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 298 of file RemoteCapablePersistenceFacade.php.
|
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 313 of file RemoteCapablePersistenceFacade.php.
|
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 327 of file RemoteCapablePersistenceFacade.php.
|
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 347 of file RemoteCapablePersistenceFacade.php.
|
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 358 of file RemoteCapablePersistenceFacade.php.
|
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 370 of file RemoteCapablePersistenceFacade.php.
|
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 398 of file RemoteCapablePersistenceFacade.php.
Member Data Documentation
const PROXY_OBJECTS_SESSION_VARNAME = 'RemoteCapablePersistenceFacadeImpl.proxyObjects' |
Definition at line 36 of file RemoteCapablePersistenceFacade.php.
const REMOTE_OBJECTS_SESSION_VARNAME = 'RemoteCapablePersistenceFacadeImpl.remoteObjects' |
Definition at line 37 of file RemoteCapablePersistenceFacade.php.