VCL
[ class tree: VCL ] [ index: VCL ] [ all elements ]

Class: ACLManager

Source Location: /acl.inc.php

Class Overview


Manager class for ACL system


Variables

Methods



Class Details

[line 35]
Manager class for ACL system

This class holds a list of all ACL objects used to control the way resources are accessed by the application.

Normally you don't have to use this class if you are not a component developer, unless you want to develop an application that uses ACL at a higher level.




[ Top ]


Class Variables

$_role =  ""

[line 73]



Tags:

access:  protected

Type:   mixed


[ Top ]



Class Methods


method addACL [line 100]

void addACL( object $acl)

Adds an ACL object to the athentication chain

Use this method to add your ACL object to the authentication chain used when isAllowed is called. Adding your object will cause the method isAllowed of your object to be called when a resource is to be accessed




Tags:



Parameters:

object   $acl   ACL object to add

[ Top ]

method addResource [line 152]

void addResource( string $resourcename)

Use this method to add a resource to the ACL system, so you can query later for it

This method is useful for you to add a resource to the ACL system, that is, 'something' in your application which access is restricted for 'someone'.

By default, all pages and all controls are added as resources, so you can specify rules to control the access to pages, even to the control level.




Tags:



Parameters:

string   $resourcename  

[ Top ]

method defaultRole [line 87]

void defaultRole( )



[ Top ]

method getRole [line 85]

string getRole( )

Holds the role to be used when querying about allowed actions

This property should be set to the user/role you want to use when querying the ACL system, tipically the user name or the group name




Tags:



[ Top ]

method isAllowed [line 121]

boolean isAllowed( [string $role = null], [string $resource = null], [string $privilege = null])

Use this method to check if an specific role (user/group/etc) is allowed to access a resource

This method is called by components to know if they are able to perform an specific action and you can also use it to check if a user has access to some resource of your app. Iterates through all the ACL objects added using addACL and call the method isAllowed of each of them until gets a positive.




Tags:

return:  True if $role is allowed to access the specific $resource and $privilege
see:  ACLManager::addACL()


Parameters:

string   $role  
string   $resource  
string   $privilege  

[ Top ]

method setRole [line 86]

void setRole( $value)



Parameters:

   $value  

[ Top ]

method __get [line 39]

void __get( $nm)



Parameters:

   $nm  

[ Top ]

method __set [line 55]

void __set( $nm, $val)



Parameters:

   $nm  
   $val  

[ Top ]


Documentation generated on Sat, 13 Jun 2009 10:50:54 -0700 by phpDocumentor 1.4.1