![]() |
![]() |

Public Member Functions | |
| getType () | |
| getPkNames () | |
| setDataConverter ($dataConverter) | |
| getDataConverter () | |
| enableLogging ($logStrategy) | |
| disableLogging () | |
| isLogging () | |
| logAction (&$obj) | |
| & | load ($oid, $buildDepth, $buildAttribs=null, $buildTypes=null) |
| & | create ($type, $buildDepth, $buildAttribs=null) |
| save (&$object) | |
| delete ($oid, $recursive=true) | |
| checkAuthorization ($oid, $action) | |
| authorizationFailedError ($oid, $action) | |
| initialize (&$object) | |
| isValidOID ($oid) | |
| & | loadImpl ($oid, $buildDepth, $buildAttribs=null, $buildTypes=null) |
| & | createImpl ($type, $buildDepth, $buildAttribs=null) |
| saveImpl (&$object) | |
| deleteImpl ($oid, $recursive=true) | |
| getOIDs ($type, $criteria=null, $orderby=null, &$pagingInfo) | |
| loadObjects ($type, $buildDepth, $criteria=null, $orderby=null, &$pagingInfo, $buildAttribs=null, $buildTypes=null) | |
| startTransaction () | |
| commitTransaction () | |
| rollbackTransaction () | |
Data Fields | |
| $_dataConverter = null | |
| $_type = '' | |
| $_logging = false | |
| $_logStrategy = null | |
wCMF - wemove Content Management Framework Copyright (C) 2005-2009 wemove digital solutions GmbH
Licensed under the terms of any of the following licenses at your choice:
See the license.txt file distributed with this work for additional information.
Definition at line 32 of file class.PersistenceMapper.php.
| getType | ( | ) |
Get the mapper type.
Reimplemented in RDBMapper, AdodbseqRDBMapper, LocktableRDBMapper, NMUserRoleRDBMapper, RoleRDBRDBMapper, and UserRDBRDBMapper.
Definition at line 43 of file class.PersistenceMapper.php.
| getPkNames | ( | ) |
Get the names of the primary key values.
Reimplemented in NodeXMLDBMapper, AdodbseqRDBMapper, LocktableRDBMapper, NMUserRoleRDBMapper, RoleRDBRDBMapper, and UserRDBRDBMapper.
Definition at line 51 of file class.PersistenceMapper.php.
References WCMFException::throwEx().
Referenced by NodeUnifiedRDBMapper::getPKColumnNames().

| setDataConverter | ( | $ | dataConverter | ) |
Set the DataConverter that should be used on load() and save().
| dataConverter | The DataConverter object. |
Definition at line 59 of file class.PersistenceMapper.php.
| getDataConverter | ( | ) |
Get the DataConverter that is used on load() and save().
Definition at line 67 of file class.PersistenceMapper.php.
| enableLogging | ( | $ | logStrategy | ) |
Enable logging using a given OutputStrategy to log insert/update/delete actions to a file.
| logStrategy | The OutputStrategy to use. |
Definition at line 75 of file class.PersistenceMapper.php.
| disableLogging | ( | ) |
Disable logging.
Definition at line 83 of file class.PersistenceMapper.php.
| isLogging | ( | ) |
Check if the PersistenceMapper is logging.
Definition at line 91 of file class.PersistenceMapper.php.
Referenced by NodeToSingleTableMapper::delete(), RDBMapper::deleteImpl(), NodeXMLDBMapper::deleteImpl(), and logAction().
| logAction | ( | &$ | obj | ) |
Log action if logging is enabled.
| obj | The object on which the action is performed on. |
Definition at line 100 of file class.PersistenceMapper.php.
References isLogging().
Referenced by NodeToSingleTableMapper::delete(), RDBMapper::deleteImpl(), NodeXMLDBMapper::deleteImpl(), NodeToSingleTableMapper::save(), RDBMapper::saveImpl(), and NodeXMLDBMapper::saveImpl().

| & load | ( | $ | oid, | |
| $ | buildDepth, | |||
| $ | buildAttribs = null, |
|||
| $ | buildTypes = null | |||
| ) |
Load an object from the database.
| oid | OID of the object to construct | |
| buildDepth | One of the BUILDDEPTH constants or a number describing the number of generations to build (except BUILDDEPTH_REQUIRED) | |
| buildAttribs | An assoziative array listing the attributes to load (default: null loads all attributes) (keys: the types, values: an array of attributes of the type to load) Use this to load only a subset of attributes | |
| buildTypes | An array listing the (sub-)types to include |
Reimplemented in NodeToSingleTableMapper.
Definition at line 115 of file class.PersistenceMapper.php.
References authorizationFailedError(), checkAuthorization(), initialize(), isValidOID(), and loadImpl().

| & create | ( | $ | type, | |
| $ | buildDepth, | |||
| $ | buildAttribs = null | |||
| ) |
Construct the template of an Object of a given type.
| type | The type of object to build | |
| buildDepth | One of the BUILDDEPTH constants or a number describing the number of generations to build | |
| buildAttribs | An assoziative array listing the attributes to create (default: null creates all attributes) (keys: the types, values: an array of attributes of the type to create) Use this to create only a subset of attributes |
Definition at line 150 of file class.PersistenceMapper.php.
References createImpl(), and initialize().

| save | ( | &$ | object | ) |
Save an Object to the persistent storage.
| object | A reference to the object to safe |
Reimplemented in NodeToSingleTableMapper, and NodeXMLMapper.
Definition at line 169 of file class.PersistenceMapper.php.
References authorizationFailedError(), checkAuthorization(), and saveImpl().

| delete | ( | $ | oid, | |
| $ | recursive = true | |||
| ) |
Delete an Object from the persistent storage.
| oid | The object id of the Object to delete | |
| recursive | True/False whether to physically delete it's children too [default: true] |
Reimplemented in NodeToSingleTableMapper, and NodeXMLMapper.
Definition at line 191 of file class.PersistenceMapper.php.
References authorizationFailedError(), checkAuthorization(), deleteImpl(), and isValidOID().

| checkAuthorization | ( | $ | oid, | |
| $ | action | |||
| ) |
Check authorization on an type/OID and a given action.
| oid | The object id of the Object to authorize (its type will be checked too) | |
| action | Action to authorize |
Definition at line 211 of file class.PersistenceMapper.php.
References RightsManager::getInstance().
Referenced by delete(), load(), and save().

| authorizationFailedError | ( | $ | oid, | |
| $ | action | |||
| ) |
Definition at line 219 of file class.PersistenceMapper.php.
References Log::error(), Message::get(), WCMFException::getStackTrace(), and WCMFException::throwEx().
Referenced by delete(), load(), and save().

| initialize | ( | &$ | object | ) |
Initialize the object after creation/loading and before handing it over to the application.
| object | A reference to the object |
Reimplemented in NodeUnifiedRDBMapper.
Definition at line 234 of file class.PersistenceMapper.php.
| isValidOID | ( | $ | oid | ) |
Validate a given OID.
| oid | The OID of the object. |
Reimplemented in NodeUnifiedRDBMapper, and TableUnifiedRDBMapper.
Definition at line 243 of file class.PersistenceMapper.php.
References WCMFException::throwEx().
Referenced by delete(), and load().

| & loadImpl | ( | $ | oid, | |
| $ | buildDepth, | |||
| $ | buildAttribs = null, |
|||
| $ | buildTypes = null | |||
| ) |
Precondition: Object rights have been checked already
Reimplemented in NodeXMLDBMapper, and RDBMapper.
Definition at line 253 of file class.PersistenceMapper.php.
References WCMFException::throwEx().
Referenced by load().

| & createImpl | ( | $ | type, | |
| $ | buildDepth, | |||
| $ | buildAttribs = null | |||
| ) |
Precondition: Object rights have been checked already
Reimplemented in NodeXMLDBMapper, and RDBMapper.
Definition at line 262 of file class.PersistenceMapper.php.
References WCMFException::throwEx().
Referenced by create().

| saveImpl | ( | &$ | object | ) |
Precondition: Object rights have been checked already
Reimplemented in NodeXMLDBMapper, and RDBMapper.
Definition at line 271 of file class.PersistenceMapper.php.
References WCMFException::throwEx().
Referenced by save().

| deleteImpl | ( | $ | oid, | |
| $ | recursive = true | |||
| ) |
Precondition: Object rights have been checked already
Reimplemented in NodeXMLDBMapper, and RDBMapper.
Definition at line 280 of file class.PersistenceMapper.php.
References WCMFException::throwEx().
Referenced by delete().

| getOIDs | ( | $ | type, | |
| $ | criteria = null, |
|||
| $ | orderby = null, |
|||
| &$ | pagingInfo | |||
| ) |
Reimplemented in NodeXMLDBMapper, and RDBMapper.
Definition at line 288 of file class.PersistenceMapper.php.
References WCMFException::throwEx().

| loadObjects | ( | $ | type, | |
| $ | buildDepth, | |||
| $ | criteria = null, |
|||
| $ | orderby = null, |
|||
| &$ | pagingInfo, | |||
| $ | buildAttribs = null, |
|||
| $ | buildTypes = null | |||
| ) |
Reimplemented in NodeXMLDBMapper.
Definition at line 296 of file class.PersistenceMapper.php.
References WCMFException::throwEx().

| startTransaction | ( | ) |
Reimplemented in NodeXMLDBMapper, RDBMapper, and NodeXMLMapper.
Definition at line 304 of file class.PersistenceMapper.php.
| commitTransaction | ( | ) |
Reimplemented in NodeXMLDBMapper, RDBMapper, and NodeXMLMapper.
Definition at line 311 of file class.PersistenceMapper.php.
| rollbackTransaction | ( | ) |
Reimplemented in NodeXMLDBMapper, RDBMapper, and NodeXMLMapper.
Definition at line 318 of file class.PersistenceMapper.php.
| $_dataConverter = null |
Definition at line 34 of file class.PersistenceMapper.php.
| $_type = '' |
Reimplemented in NodeToSingleTableMapper.
Definition at line 35 of file class.PersistenceMapper.php.
| $_logging = false |
Definition at line 36 of file class.PersistenceMapper.php.
| $_logStrategy = null |
Definition at line 37 of file class.PersistenceMapper.php.
|
This page generated via doxygen 1.5.8 Mon Mar 30 01:58:45 2009. Copyright © 2009 wemove digital solutions GmbH. |
|