ACL Extension
0.3
|
Public Member Functions | |
join ($obj) | |
leave ($obj) | |
is ($obj) | |
getFreeNodes () | |
fetchComprisedPositions () | |
addPositionCheck ($positions, $type, $table= 't') | |
getDirectChildNodes (AclObject $child=NULL) | |
getDirectParentNodes (AclObject $parent=NULL) | |
getChildObjects () | |
getParentObjects () | |
loadObject ($identifier, $model=NULL) | |
loadObjects ($identifier, $model=NULL, $onlyFirst=true) | |
getNodes () | |
afterSave () | |
getAssociatedObject () |
Static Public Member Functions | |
static | loadObjectStatic ($identifier, $model) |
static | loadObjectsStatic ($identifier, $model=NULL, $onlyFirst=true) |
Protected Member Functions | |
beforeJoin (&$obj) | |
beforeLeave (&$obj) | |
beforeIs (&$obj) | |
createNode ($parent=NULL) | |
assureSaved () | |
assureSafety (&$obj) |
Definition at line 16 of file AclObject.php.
|
abstract |
Builds a single SQL-statement comprising all given positions and their parents This SQL-statement will match all those rows being located above the given positions including themselves
array | $positions | All positions to include in our statement |
string | $type | aco/aro |
string | $table | the table comprising the map between objects and permissions |
Reimplemented in PmAclObject.
afterSave | ( | ) |
Processes post-saving tasks
Definition at line 311 of file AclObject.php.
|
protected |
Assures that:
AclObject | $obj |
Definition at line 351 of file AclObject.php.
|
protected |
Reassures that all passed objects have been saved
Definition at line 335 of file AclObject.php.
|
protected |
Callback being executed before every childhood-check Usage of this method allows common behavior for several strategies with respect to object transformations and a secure environment
AclObject | $obj |
Definition at line 51 of file AclObject.php.
|
protected |
Callback being executed before every join Usage of this method allows common behavior for several strategies with respect to object transformations and a secure environment
AclObject | $obj |
Definition at line 31 of file AclObject.php.
|
protected |
Callback being executed before every leave Usage of this method allows common behavior for several strategies with respect to object transformations and a secure environment
AclObject | $obj |
Definition at line 41 of file AclObject.php.
|
abstractprotected |
Creates a new node of this collection This new node will be a children of the given AclNode
AclNode | $parent | parent of the new node, if NULL, it has no parent |
Reimplemented in PmAclObject.
|
abstract |
Fetches and returns positions of all nodes of this object which denote them In this case, it's really easy because we've done that anyway :)
Reimplemented in PmAclObject.
getAssociatedObject | ( | ) |
Loads the associated object, if possible, and returns it
Definition at line 324 of file AclObject.php.
getChildObjects | ( | ) |
Fetches all child-objects and returns them in an array
Definition at line 136 of file AclObject.php.
|
abstract |
|
abstract |
|
abstract |
Returns all of the AclNodes of this object which do not have a parent yet
public
AclObject | object |
Reimplemented in PmAclObject.
getNodes | ( | ) |
This method returns all AclNodes being associated with this
public
AclObject | object |
Definition at line 302 of file AclObject.php.
getParentObjects | ( | ) |
Fetches all parent-objects and returns them in an array
Definition at line 154 of file AclObject.php.
|
abstract |
Checks whether this object is somehow a child of the given object
mixed | $obj |
Reimplemented in PmAclObject.
|
abstract |
Joins the given object (now called: group)
mixed | $obj |
Reimplemented in PmAclObject.
|
abstract |
loadObject | ( | $identifier, | |
$model = NULL |
|||
) |
Just a convenient wrapper to loadObjects
mixed | $identifier | The Identifier denoting the associated row in the ACL-system. |
string | $model | - the class-Name of the expected object (Aro or Aco) |
Definition at line 182 of file AclObject.php.
loadObjects | ( | $identifier, | |
$model = NULL , |
|||
$onlyFirst = true |
|||
) |
Just a convenient wrapper to loadObjects
mixed | $identifier | The Identifier denoting the associated row in the ACL-system. |
string | $model | - the class-Name of the expected object (Aro or Aco) |
Definition at line 193 of file AclObject.php.
|
static |
This method is used to load Objects (either Aco or Aro) using convenient identifiers.
mixed | $identifier | The Identifier denoting the associated row in the ACL-system. Supported identifiers: 1) Array syntax: array('model' => 'MyModel', 'foreign_key' => myId) e.g.: model => User, foreign_key => the ID of the user (presumably AUTO_INCREMENT INT from the user row) 2) alias syntax: "MyAlias" e.g.: "Visitors", "Admins", "Authors" 3) direct syntax: pass your object derived from CActiveRecord directly e.g.: loadObject(User::model()->find(....)) This will be automatically resolved to the first syntax. Please be aware that auto-creation of associated ACL-objects only happens if the strict-mode is disabled So if you pass a new object which has no corresponding aco/aro-row, this will lead to an exception if the strict-mode is enabled. 4) Of course, you can pass the finished object directly. As many methods call this method without check, this is natural. |
string | $model | - the class-Name of the expected object (Aro or Aco) |
boolean | $onlyFirst | Determines whether to fetch only the first matching object, or all of them. |
Definition at line 221 of file AclObject.php.
|
static |
Just a convenient wrapper to loadObjects
mixed | $identifier | The Identifier denoting the associated row in the ACL-system. |
string | $model | - the class-Name of the expected object (Aro or Aco) |
Definition at line 173 of file AclObject.php.