Class Zend_Acl

Description
  • license: New BSD License
  • copyright: Copyright (c) 2006 Zend Technologies USA Inc. (http://www.zend.com)

Located in /Zend/Acl.php (line 41)


	
			
Class Constant Summary
 ACO_CATCHALL = '__ALL__'
 ARO_DEFAULT = '_default'
 MODE_ADD = 2
 MODE_SET = 1
 PATH_DEFAULT = '_default'
 PERM_DEFAULT = false
Variable Summary
Method Summary
Zend_Acl __construct ([Zend_Acl $parent = null], [string $path = self::PATH_DEFAULT])
Zend_Acl allow ([mixed $aro = Zend_Acl::ARO_DEFAULT], [mixed $value = null], [mixed $path = null])
Zend_Acl deny ([mixed $aro = Zend_Acl::ARO_DEFAULT], [mixed $value = null], [mixed $path = null])
array getChildren ()
Zend_Acl_Permission getDeny (mixed $path)
string getPath ()
array getValidAro ([string $context = null], [mixed $aro = null])
boolean remove ([string $path = null])
Zend_Acl removeAllow ([mixed $aro = Zend_Acl::ARO_DEFAULT], [mixed $value = Zend_Acl::ACO_CATCHALL], [mixed $path = Zend_Acl::PATH_DEFAULT])
boolean removeAro (mixed $aro, [mixed $context = Zend_Acl::ACO_CATCHALL], [mixed $path = null])
Zend_Acl removeDeny ([mixed $aro = Zend_Acl::ARO_DEFAULT], [mixed $value = Zend_Acl::ACO_CATCHALL], [mixed $path = Zend_Acl::PATH_DEFAULT])
boolean valid ([ $aro = Zend_Acl::ARO_DEFAULT], [string $context = null], [string $path = null], string $id)
Zend_Acl _addPath (mixed $path)
Zend_Acl _findPath (Zend_Acl $root, mixed $path)
boolean _isRoot ()
array _parseAro ( $id)
Zend_Acl _setPermission (mixed $acl, mixed $value, mixed $aro, mixed $path, [mixed $mode = Zend_Acl::MODE_SET])
boolean _valid (Zend_Acl $root, mixed $aro, mixed $context)
Zend_Acl __get (string $path)
void __set (string $path, Zend_Acl $value)
Variables
array $_data = array() (line 104)

All children of this ACO

  • access: protected
Zend_Acl $_parent (line 98)

Parent ACO.

  • access: protected
string $_path (line 80)

Path name for ACO

  • access: protected
Zend_Acl $_perm (line 86)

Permissions for this ACO.

  • access: protected
Zend_Acl $_registry (line 92)

ARO registry for this ARO.

  • access: protected
Methods
Constructor __construct (line 115)

Class constructor

A reference to the parent object is created if supplied.

  • access: public
  • throws: Zend_Acl_Exception
Zend_Acl __construct ([Zend_Acl $parent = null], [string $path = self::PATH_DEFAULT])
allow (line 276)

Sets allow permissions to the ACL

Each parameter can be a string or a numeric array of values to allow assignment to many parameters at once. The $path can use a forward slash delimeter to indicate a nested relative path

  • return: Provides a fluent interface
  • access: public
Zend_Acl allow ([mixed $aro = Zend_Acl::ARO_DEFAULT], [mixed $value = null], [mixed $path = null])
  • mixed $aro
  • mixed $value
  • mixed $path
aroRegistry (line 159)

Retrieve the global ARO registry

  • access: public
Zend_Acl_Aro_Registry aroRegistry ()
deny (line 289)

Sets deny permissions to the ACL

  • return: Provides a fluent interface
  • access: public
Zend_Acl deny ([mixed $aro = Zend_Acl::ARO_DEFAULT], [mixed $value = null], [mixed $path = null])
  • mixed $aro
  • mixed $value
  • mixed $path
getAllow (line 332)

Returns allow permissions for the current ACL

  • return: Provides a fluent interface
  • access: public
Zend_Acl_Permission getAllow ()
getChildren (line 213)

Returns the ACL's child nodes

  • access: public
array getChildren ()
getDeny (line 343)

Returns deny permissions for the current ACL

  • return: Provides a fluent interface
  • access: public
Zend_Acl_Permission getDeny (mixed $path)
  • mixed $path
getParent (line 203)

Returns the ACL's parent object

  • access: public
Zend_Acl|null getParent ()
getPath (line 223)

Returns the ACL's path

  • access: public
string getPath ()
getValidAro (line 247)

Returns an array of AROs that can access the ACL

This function will determine which AROs - from either a list of AROs or the entire ARO registry - have access to the current ARO.

AROs can be supplied either an an ARO object, an array of ARO objects, a string id or an array of string ids. If the ARO parameter is left empty then the ARO registry is used to return all members.

To allow fine-grain control, a specific context can also be used to validate the AROs

An array of ARO objects is returned upon success or empty

  • access: public
array getValidAro ([string $context = null], [mixed $aro = null])
  • mixed $aro
  • string $context
remove (line 359)

Removes an ACL node

If a path is provided and exists, it will be destroyed. If no path is provided then the current ACL will instead be removed from its parent (if the current ACL is not root)

  • access: public
  • throws: Zend_Acl_Exception
boolean remove ([string $path = null])
  • string $path
removeAllow (line 305)

Removes allow permissions from the ACL

Removes explicit allow permissions from the ACL whilst retaining existing values. If no $value is passed, all explicit permissions are removed.

  • return: Provides a fluent interface
  • access: public
Zend_Acl removeAllow ([mixed $aro = Zend_Acl::ARO_DEFAULT], [mixed $value = Zend_Acl::ACO_CATCHALL], [mixed $path = Zend_Acl::PATH_DEFAULT])
  • mixed $aro
  • mixed $value
  • mixed $path
removeAro (line 384)

Removes an ARO from current node and all children

  • access: public
boolean removeAro (mixed $aro, [mixed $context = Zend_Acl::ACO_CATCHALL], [mixed $path = null])
  • mixed $aro
  • mixed $context
  • mixed $path
removeDeny (line 320)

Removes deny permissions from the ACL

  • return: Provides a fluent interface
  • access: public
Zend_Acl removeDeny ([mixed $aro = Zend_Acl::ARO_DEFAULT], [mixed $value = Zend_Acl::ACO_CATCHALL], [mixed $path = Zend_Acl::PATH_DEFAULT])
  • mixed $aro
  • mixed $value
  • mixed $path
valid (line 185)

Test permissions for a path

Retrieve permissions for an ACO based on the ARO, current context and an optional path. The optional path parameter allows for a top-down search from a root - if not supplied, then this instance is used as a target. A 'null' context will return true if no explicit permissions are set to 'deny' for the specified group on the target ACO.

  • access: public
  • throws: Zend_Acl_Exception
boolean valid ([ $aro = Zend_Acl::ARO_DEFAULT], [string $context = null], [string $path = null], string $id)
  • string $id
  • string $context
  • string $path
  • $aro
_addPath (line 527)

Creates new 'virtual' ACLs to target (nonexistent) path

  • access: protected
Zend_Acl _addPath (mixed $path)
  • mixed $path
_createPath (line 508)

Creates child paths from current ACO to destination ACO

$path uses a forward slash to denote a nested path (@see setAllow()). If the target path does not exist, a new empty ACL is created.

  • access: protected
Zend_Acl_Permission _createPath (string $path)
  • string $path
_findPath (line 539)

Expand a path to retrieve target node

  • access: protected
Zend_Acl _findPath (Zend_Acl $root, mixed $path)
_getPermission (line 471)

Retrieves permissions for a container

  • access: protected
Zend_Acl_Permission _getPermission ()
_isRoot (line 559)

Determines if the current ACL is root

  • access: protected
boolean _isRoot ()
_parseAro (line 484)

Retrieves an array of ARO objects for the selected id

  • access: protected
array _parseAro ( $id)
  • $id
_setPermission (line 440)

Adds permissions to one or more permission containers

This method is responsible for passing contexts and groups to each individual permissions container for processing. The $mode determines if those contexts are to be set, added or removed

  • return: Provides a fluent interface
  • access: protected
Zend_Acl _setPermission (mixed $acl, mixed $value, mixed $aro, mixed $path, [mixed $mode = Zend_Acl::MODE_SET])
  • mixed $acl
  • mixed $value
  • mixed $aro
  • mixed $path
  • mixed $mode
_valid (line 405)

Removes an ARO from current node and all children

  • access: protected
boolean _valid (Zend_Acl $root, mixed $aro, mixed $context)
  • Zend_Acl $root
  • mixed $aro
  • mixed $context
__get (line 131)

Retrieve reference to ACO via 'path' property

If the path exists then return a reference to it, otherwise return a reference to self. This means that permissions can be implied for a path rather than explicitly set (they infer an inherited permission).

  • access: public
Zend_Acl __get (string $path)
  • string $path
__set (line 149)

Create path

Add a new path to this ACL.

  • access: public
void __set (string $path, Zend_Acl $value)
Class Constants
ACO_CATCHALL = '__ALL__' (line 61)

Magic catch-all keyword

ARO_DEFAULT = '_default' (line 46)

Default group id

MODE_ADD = 2 (line 72)
MODE_REMOVE = 3 (line 73)
MODE_SET = 1 (line 71)

Modes for adding permissions to a permission container

MODE_UNSET = 4 (line 74)
PATH_DEFAULT = '_default' (line 51)

Default path

PATH_DELIMITER = '/' (line 56)

Default delimiter for paths

PERM_DEFAULT = false (line 66)

Default permission in case of final neutral result

Documentation generated on Sun, 29 Oct 2006 21:27:50 -0600 by phpDocumentor 1.3.0RC6