API Documentation

Acl/Role/Registry.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Acl
version
$Id: Registry.php 20096 2010-01-06 02:05:09Z bkarwin $
Classes
Zend_Acl_Role_Registry

Description

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Zend_Acl_Role_Registry

category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Acl
Properties
$_roles
Methods
add
get
has
getParents
inherits
remove
removeAll
getRoles

Description

Properties

$_roles

array $_roles = 'array'

Internal Role registry data storage

Details

$_roles
array
visibility
protected
default
array
final
false
static
false

Methods

add

add( Zend_Acl_Role_Interface $role, Zend_Acl_Role_Interface|string|array $parents = null ) : Zend_Acl_Role_Registry

Adds a Role having an identifier unique to the registry

The $parents parameter may be a reference to, or the string identifier for, a Role existing in the registry, or $parents may be passed as an array of these - mixing string identifiers and objects is ok - to indicate the Roles from which the newly added Role will directly inherit.

In order to resolve potential ambiguities with conflicting rules inherited from different parents, the most recently added parent takes precedence over parents that were previously added. In other words, the first parent added will have the least priority, and the last parent added will have the highest priority.

Arguments
$role
Zend_Acl_Role_Interface
$parents
Zend_Acl_Role_Interfacestringarray
Output
Zend_Acl_Role_Registry
Provides a fluent interface
Details
visibility
public
final
false
static
false
throws

get

get( Zend_Acl_Role_Interface|string $role ) : Zend_Acl_Role_Interface

Returns the identified Role

The $role parameter can either be a Role or a Role identifier.

Arguments
$role
Zend_Acl_Role_Interfacestring
Details
visibility
public
final
false
static
false
throws

getParents

getParents( Zend_Acl_Role_Interface|string $role ) : array

Returns an array of an existing Role's parents

The array keys are the identifiers of the parent Roles, and the values are the parent Role instances. The parent Roles are ordered in this array by ascending priority. The highest priority parent Role, last in the array, corresponds with the parent Role most recently added.

If the Role does not have any parents, then an empty array is returned.

Arguments
$role
Zend_Acl_Role_Interfacestring
Output
array
Details
visibility
public
final
false
static
false
uses
Zend_Acl_Role_Registry::get()

getRoles

getRoles( ) :
Details
visibility
public
final
false
static
false

has

has( Zend_Acl_Role_Interface|string $role ) : boolean

Returns true if and only if the Role exists in the registry

The $role parameter can either be a Role or a Role identifier.

Arguments
$role
Zend_Acl_Role_Interfacestring
Output
boolean
Details
visibility
public
final
false
static
false

inherits

inherits( Zend_Acl_Role_Interface|string $role, Zend_Acl_Role_Interface|string $inherit, boolean $onlyParents = false ) : boolean

Returns true if and only if $role inherits from $inherit

Both parameters may be either a Role or a Role identifier. If $onlyParents is true, then $role must inherit directly from $inherit in order to return true. By default, this method looks through the entire inheritance DAG to determine whether $role inherits from $inherit through its ancestor Roles.

Arguments
$role
Zend_Acl_Role_Interfacestring
$inherit
Zend_Acl_Role_Interfacestring
$onlyParents
boolean
Output
boolean
Details
visibility
public
final
false
static
false
throws

remove

remove( Zend_Acl_Role_Interface|string $role ) : Zend_Acl_Role_Registry

Removes the Role from the registry

The $role parameter can either be a Role or a Role identifier.

Arguments
$role
Zend_Acl_Role_Interfacestring
Output
Zend_Acl_Role_Registry
Provides a fluent interface
Details
visibility
public
final
false
static
false
throws

removeAll

removeAll( ) : Zend_Acl_Role_Registry

Removes all Roles from the registry

Output
Zend_Acl_Role_Registry
Provides a fluent interface
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.