Docs For Class Zend_Acl_Permission

## Class Zend_Acl_Permission

Description

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

Located in /Zend/Acl/Permission.php (line 29)

Variable Summary
array $_context
Method Summary
array getPermissions (string $type)
integer score (string $type, Zend_Acl_Aro $aro, [string $context = null])
integer setValues (string $type, mixed $value, array $aro, [integer $mode = Zend_Acl::MODE_ADD])
string _getContext ( $value)
integer _getFactor (Zend_Acl_Aro $aro, $id)
string _getReverse ( $type)
Variables
array $_context = array('allow' => array(),'deny'=>array()) (line 35)

Contains allow and deny context values

- access: protected

Methods
getPermissions (line 82)

Returns the contents of the selected permission

- access: public

array getPermissions (string $type)

- string $type

score (line 49)

Returns a score for the selected permission

The score is factored according to an exact match for an ARO (3), a match for an inherited ARO (2) or a match for an any/all ARO (1).

- access: public

integer score (string $type, Zend_Acl_Aro $aro, [string $context = null])

- string $type
- array $aro
- string $context

setValues (line 114)

Sets contexts for a permission

$type represents either an 'allow' or 'deny' $values represents the contexts allowed for the permission type and can be supplied as a string or an array of values $aro can be either a string id or an array of values to represent multiple aros (and their inherited permissions) $mode is provided as either set, add or remove

If $values contains the magic value Zend_Acl::ACO_CATCHALL then all nominated aros will provide an explicit match for the permission type. Otherwise, as each context is set, the opposite is checked for to ensure no deadlocks for permissions

E.g. If 'admin' is provided for 'allow', then 'admin' will be removed from 'deny' if it exists for the selected aro(s)

- access: public

integer setValues (string $type, mixed $value, array $aro, [integer $mode = Zend_Acl::MODE_ADD])

- string $type
- mixed $value
- array $aro
- integer $mode

_getContext (line 180)

Parses context value

Ensures that the magic Zend_Acl::ACO_CATCHALL value is returned as a single array (as it overrides all other explicit contexts) if exists. Otherwise cast the value(s) as an array for storage.

- access: protected

string _getContext ( $value)

- $value

_getFactor (line 202)

Returns a score factor for the selected Aro

Ensures that a specific permission context is assigned a higher score than an inherited permission

- access: protected

integer _getFactor (Zend_Acl_Aro $aro, $id)

- Zend_Acl_Aro $aro
- $id

_getReverse (line 217)

Returns the inverse to the permission type

- access: protected

string _getReverse ( $type)

- $type

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