[ Index ]

PHP Cross Reference of ACL Module

title

Body

[close]

/components/strategies/nestedSet/pathMaterialization/models/ -> PmAclNode.php (summary)

Implements path-materilization and node-specific logic for tree-operations

Author: dispy <dispyfree@googlemail.com>
License: LGPLv2
File Size: 131 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 7 functions

  removeFullRecursively()
  takeOverPermissions()
  branchNodeSubTree()
  generateDirectChildrenCondition()
  generateDirectParentCondition()
  getOwnPath()
  __clone()

Functions
Functions that are not part of a class:

removeFullRecursively()   X-Ref
Removes all child-nodes and their associated permissions


takeOverPermissions($node)   X-Ref
This method copies all permissions assigned to another
AclNode-Object of the same AclObject

param: AclNode the node to take the permissions from

branchNodeSubTree( $source, $destination)   X-Ref
Copies all children of $source recursively into $destination
This branching is necessary because: If an AclObject is a child of another one,
every AclNode of the parent object has to have one AclNode of the child AclObject
as it's child (this is due to the lookup-mechanism this extension uses)
If a new AclNode is created (for example because the parent object itself joins
another object), the subtree of an existing node is copied to the new node

In fact "copied" is the wrong term, because each node isn't cloned but
a surrogate is created which is in fact another object - but a node of the same
AclObject having the same children as the original one.

param: AclNode source
param: AclNode destination
return: int  the number of branched nodes (recursive!)

generateDirectChildrenCondition()   X-Ref
Generates the condition matching the direct AclNodes of this node

return: array(string, array) the first is the condition, the second one the params

generateDirectParentCondition()   X-Ref
Generates the condition matching the direct parent AclNodes of this node

return: array(string, array) the first is the condition, the second one the params

getOwnPath()   X-Ref
Gets the path of this node including itself

return: string the own path

__clone()   X-Ref
No description



Generated: Sun Jul 1 19:24:45 2012 Cross-referenced by PHPXref 0.7.1