Detailed Description
AbstractMapper provides a basic implementation for other mapper classes.
It handles authorization on entity level and calls the lifecycle callcacks of PersistentObject instances. Authorization on attribute level has to be implemented by subclasses.
Definition at line 38 of file AbstractMapper.php.
Public Member Functions | |
__construct (PersistenceFacade $persistenceFacade, PermissionManager $permissionManager, ConcurrencyManager $concurrencyManager, EventManager $eventManager, Message $message) | |
setLogStrategy (OutputStrategy $logStrategy) | |
hasRelation ($roleName) | |
hasAttribute ($name) | |
load (ObjectId $oid, $buildDepth=BuildDepth::SINGLE) | |
create ($type, $buildDepth=BuildDepth::SINGLE) | |
save (PersistentObject $object) | |
delete (PersistentObject $object) | |
getOIDs ($type, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null) | |
loadObjects ($type, $buildDepth=BuildDepth::SINGLE, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null) | |
loadRelation (array $objects, $role, $buildDepth=BuildDepth::SINGLE, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null) | |
Public Member Functions inherited from PersistenceMapper | |
getType () | |
getTypeDisplayName (Message $message) | |
getTypeDescription (Message $message) | |
getPkNames () | |
getQuoteIdentifierSymbol () | |
quoteIdentifier ($identifier) | |
quoteValue ($value) | |
getRelations ($hierarchyType='all') | |
getRelation ($roleName) | |
getRelationsByType ($type) | |
getAttributes (array $tags=array(), $matchMode='all') | |
getAttribute ($name) | |
getAttributeDisplayName ($name, Message $message) | |
getAttributeDescription ($name, Message $message) | |
getProperties () | |
isSortable ($roleName=null) | |
getSortkey ($roleName=null) | |
getDefaultOrder ($roleName=null) | |
executeOperation (PersistenceOperation $operation) | |
beginTransaction () | |
commitTransaction () | |
rollbackTransaction () | |
Protected Member Functions | |
logAction (PersistentObject $obj) | |
checkAuthorization ($resource, $action) | |
authorizationFailedError ($resource, $action) | |
loadImpl (ObjectId $oid, $buildDepth=BuildDepth::SINGLE) | |
createImpl ($type, $buildDepth=BuildDepth::SINGLE) | |
saveImpl (PersistentObject $object) | |
deleteImpl (PersistentObject $object) | |
getOIDsImpl ($type, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null) | |
loadObjectsImpl ($type, $buildDepth=BuildDepth::SINGLE, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null) | |
loadRelationImpl (array $objects, $role, $buildDepth=BuildDepth::SINGLE, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null) | |
Protected Attributes | |
$_persistenceFacade = null | |
$_permissionManager = null | |
$_concurrencyManager = null | |
$_eventManager = null | |
$_message = null | |
Constructor & Destructor Documentation
__construct | ( | PersistenceFacade | $persistenceFacade, |
PermissionManager | $permissionManager, | ||
ConcurrencyManager | $concurrencyManager, | ||
EventManager | $eventManager, | ||
Message | $message | ||
) |
Constructor.
- Parameters
-
$persistenceFacade $permissionManager $concurrencyManager $eventManager $message
Definition at line 61 of file AbstractMapper.php.
Member Function Documentation
setLogStrategy | ( | OutputStrategy | $logStrategy | ) |
Set the OutputStrategy used for logging persistence actions.
- Parameters
-
$logStrategy
Definition at line 80 of file AbstractMapper.php.
hasRelation | ( | $roleName | ) |
- See also
- PersistenceMapper::hasRelation()
Implements PersistenceMapper.
Definition at line 87 of file AbstractMapper.php.
hasAttribute | ( | $name | ) |
Implements PersistenceMapper.
Definition at line 104 of file AbstractMapper.php.
load | ( | ObjectId | $oid, |
$buildDepth = BuildDepth::SINGLE |
|||
) |
- See also
- PersistenceMapper::load()
Implements PersistenceMapper.
Definition at line 121 of file AbstractMapper.php.
create | ( | $type, | |
$buildDepth = BuildDepth::SINGLE |
|||
) |
- See also
- PersistenceMapper::create()
Implements PersistenceMapper.
Definition at line 142 of file AbstractMapper.php.
save | ( | PersistentObject | $object | ) |
- See also
- PersistenceMapper::save()
Implements PersistenceMapper.
Definition at line 158 of file AbstractMapper.php.
delete | ( | PersistentObject | $object | ) |
- See also
- PersistenceMapper::delete()
Implements PersistenceMapper.
Definition at line 216 of file AbstractMapper.php.
getOIDs | ( | $type, | |
$criteria = null , |
|||
$orderby = null , |
|||
PagingInfo | $pagingInfo = null |
||
) |
- See also
- PersistenceMapper::getOIDs()
Implements PersistenceMapper.
Definition at line 249 of file AbstractMapper.php.
loadObjects | ( | $type, | |
$buildDepth = BuildDepth::SINGLE , |
|||
$criteria = null , |
|||
$orderby = null , |
|||
PagingInfo | $pagingInfo = null |
||
) |
- See also
- PersistenceMapper::loadObjects()
Implements PersistenceMapper.
Definition at line 270 of file AbstractMapper.php.
loadRelation | ( | array | $objects, |
$role, | |||
$buildDepth = BuildDepth::SINGLE , |
|||
$criteria = null , |
|||
$orderby = null , |
|||
PagingInfo | $pagingInfo = null |
||
) |
Implements PersistenceMapper.
Definition at line 296 of file AbstractMapper.php.
|
protected |
Log the state of the given object.
- Parameters
-
$obj PersistentObject instance
Definition at line 326 of file AbstractMapper.php.
|
protected |
Check authorization on a resource (type/instance/instance property) and a given action.
- Parameters
-
$resource Resource to authorize $action Action to authorize
- Returns
- Boolean depending on success of authorization
Definition at line 338 of file AbstractMapper.php.
|
protected |
Handle an authorization error.
- Parameters
-
$resource $action
- Exceptions
-
AuthorizationException
Definition at line 348 of file AbstractMapper.php.
|
abstractprotected |
- See also
- PersistenceFacade::load()
- Note
- Precondition: Object rights have been checked already
|
abstractprotected |
- See also
- PersistenceFacade::create()
- Note
- Precondition: Object rights have been checked already
|
abstractprotected |
- See also
- PersistenceMapper::save()
- Note
- Precondition: Object rights have been checked already
|
abstractprotected |
- See also
- PersistenceMapper::delete()
- Note
- Precondition: Object rights have been checked already
|
abstractprotected |
- See also
- PersistenceMapper::getOIDs()
|
abstractprotected |
- See also
- PersistenceMapper::loadObjects()
|
abstractprotected |
Member Data Documentation
|
protected |
Definition at line 47 of file AbstractMapper.php.
|
protected |
Definition at line 48 of file AbstractMapper.php.
|
protected |
Definition at line 49 of file AbstractMapper.php.
|
protected |
Definition at line 50 of file AbstractMapper.php.
|
protected |
Definition at line 51 of file AbstractMapper.php.