Class modAccessibleObject

Description

Defines an interface to provide configurable access policies for principals.

Located in /model/modx/modaccessibleobject.class.php (line 7)

xPDOObject
   |
   --modAccessibleObject
Direct descendents
Class Description
 class modAccessibleSimpleObject
 class modContext Represents a virtual site context within a modX repository.
 class modMenu Represents a menu item at the top of the MODx manager.
Variable Summary
 array $_policies
Method Summary
 static void load ( &$xpdo,  $className,  $criteria, [ $cacheFlag = true])
 static void loadCollection ( &$xpdo,  $className, [ $criteria = null], [ $cacheFlag = true])
 static void _loadCollectionInstance ( &$xpdo,  &$objCollection,  $className,  $criteria,  $row,  $fromCache, [ $cacheFlag = true])
 static void _loadInstance ( &$xpdo,  $className,  $criteria,  $row)
 boolean checkPolicy (array $criteria, [string|array $targets = null])
 array findPolicy ([string $context = ''])
 void getPolicies ()
 void remove ([ $ancestors = array ()])
 void save ([ $cacheFlag = null])
 void setPolicies ([ $policies = array()])
Variables
Methods
static load (line 69)

Custom instance loader that forces access policy checking.

  • access: public
static void load ( &$xpdo,  $className,  $criteria, [ $cacheFlag = true])
  • xPDO &$xpdo
  • $className
  • $criteria
  • $cacheFlag

Redefinition of:
xPDOObject::load()
Load an instance of an xPDOObject or derivative class.
static loadCollection (line 118)

Custom collection loader that forces access policy checking.

  • access: public
static void loadCollection ( &$xpdo,  $className, [ $criteria = null], [ $cacheFlag = true])
  • xPDO &$xpdo
  • $className
  • $criteria
  • $cacheFlag

Redefinition of:
xPDOObject::loadCollection()
Load a collection of xPDOObject instances.
static _loadCollectionInstance (line 37)

Custom instance loader for collections that respects policy checking.

  • access: public
static void _loadCollectionInstance ( &$xpdo,  &$objCollection,  $className,  $criteria,  $row,  $fromCache, [ $cacheFlag = true])
  • xPDO &$xpdo
  • array &$objCollection
  • $className
  • $criteria
  • $row
  • $fromCache
  • $cacheFlag

Redefinition of:
xPDOObject::_loadCollectionInstance()
Responsible for loading an instance into a collection.
static _loadInstance (line 19)

Custom instance from row loader that respects policy checking

  • access: public
static void _loadInstance ( &$xpdo,  $className,  $criteria,  $row)
  • &$xpdo
  • $className
  • $criteria
  • $row

Redefinition of:
xPDOObject::_loadInstance()
Loads an instance from an associative array.
checkPolicy (line 194)

Determine if the current user attributes satisfy the object policy.

  • return: Returns true if the policy is satisfied or no policy exists.
  • access: public
boolean checkPolicy (array $criteria, [string|array $targets = null])
  • array $criteria: An associative array providing a key and value to search for within the matched policy attributes between policy and principal.
  • string|array $targets: A target modAccess class name or an array of class names to limit the check. In most cases, this does not need to be set; derivatives should typically determine what targets to include in the findPolicy() implementation.
findPolicy (line 253)

Find access policies applicable to this object in a specific context.

  • return: An array of access policies for this object; an empty array is returned if no policies are assigned to the object.
  • access: public
array findPolicy ([string $context = ''])
  • string $context: A key identifying a specific context to use when searching for the applicable policies. If not provided, the current context is used.

Redefined in descendants as:
getPolicies (line 257)
  • access: public
void getPolicies ()
remove (line 172)

Custom remove that respects access policies.

  • access: public
void remove ([ $ancestors = array ()])
  • array $ancestors

Redefinition of:
xPDOObject::remove()
Remove the persistent instance of an object permanently.

Redefined in descendants as:
save (line 158)

Custom save that respects access policies.

  • access: public
void save ([ $cacheFlag = null])
  • $cacheFlag

Redefinition of:
xPDOObject::save()
Persist new or changed objects to the database container.

Redefined in descendants as:
setPolicies (line 261)
  • access: public
void setPolicies ([ $policies = array()])
  • array $policies

Inherited Methods

Inherited From xPDOObject

 xPDOObject::__construct()
 xPDOObject::addMany()
 xPDOObject::addOne()
 xPDOObject::addValidationRule()
 xPDOObject::encode()
 xPDOObject::fromArray()
 xPDOObject::fromJSON()
 xPDOObject::get()
 xPDOObject::getFieldName()
 xPDOObject::getFKClass()
 xPDOObject::getFKDefinition()
 xPDOObject::getMany()
 xPDOObject::getOne()
 xPDOObject::getOption()
 xPDOObject::getPK()
 xPDOObject::getPKType()
 xPDOObject::getPrimaryKey()
 xPDOObject::getSelectColumns()
 xPDOObject::getValidator()
 xPDOObject::isDirty()
 xPDOObject::isLazy()
 xPDOObject::isNew()
 xPDOObject::isValidated()
 xPDOObject::load()
 xPDOObject::loadCollection()
 xPDOObject::loadCollectionGraph()
 xPDOObject::remove()
 xPDOObject::removeValidationRules()
 xPDOObject::save()
 xPDOObject::set()
 xPDOObject::setDirty()
 xPDOObject::setOption()
 xPDOObject::toArray()
 xPDOObject::toJSON()
 xPDOObject::validate()
 xPDOObject::_getAliases()
 xPDOObject::_getDataType()
 xPDOObject::_getPHPType()
 xPDOObject::_getRelatedObjectsByFK()
 xPDOObject::_initFields()
 xPDOObject::_loadCollectionInstance()
 xPDOObject::_loadFieldData()
 xPDOObject::_loadInstance()
 xPDOObject::_loadRows()
 xPDOObject::_loadValidation()
 xPDOObject::_saveRelatedObject()
 xPDOObject::_saveRelatedObjects()
 xPDOObject::_setRaw()

Documentation generated on Fri, 17 Jun 2011 10:03:21 -0600 by phpDocumentor 1.4.3