acl 
[ doc home ] [ class tree: acl ] [ index: acl ] [ all elements ]

Class: IsterACLProtector

Source Location: /IsterACLProtector.php

Class Overview

IsterObject
   |
   --IsterACLProtector

This class represents a protector.


Author(s): Ingo Schramm   

Copyright: Copyright (c) 2005 Ister.ORG Ingo Schramm

Variables

Methods


Inherited Constants

Inherited Variables

Inherited Methods

Class: IsterObject

IsterObject::IsterObject()
Constructor
IsterObject::abstractMethodError()
Report attempt to call an abstract method.
IsterObject::addLogger()
Add an IsterLogger to process log messages.
IsterObject::deleteLogger()
Delete an already registered IsterLogger.
IsterObject::getLoggerNames()
Fetch the names of all currently registered IsterLoggers.
IsterObject::getMem()
Return maximum amount of memory an application has allocated at this point.
IsterObject::log()
Trigger a log message.
IsterObject::passPHPmessage()
Catch PHP E_WARNING and E_NOTICE messages.
IsterObject::serialize()
Serialize the object.
IsterObject::setLogLocal()
Set logging local for the current object.
IsterObject::setupLogger()
Setup a logger.
IsterObject::triggerError()
Alias for log();
IsterObject::unserialize()
Unserialize the object.
IsterObject::__sleep()
Executed prior to serialize().
IsterObject::__wakeup()
Executed prior to unserialize().

Class Details

This class represents a protector.

An IsterACLProtector expects either a container object providing a UID or such a UID directly. A UID should be an IsterACLIdentiy object but may be a simple string or number. Also an IsterACL object is expected. Then you may check if the current identity has access granted with the current ACL for a given access method.

This class has been designed for use with IsterUIFramework.


copyright:  Copyright (c) 2005 Ister.ORG Ingo Schramm
author:  Ingo Schramm
see:  IsterACLIdentiy, IsterUIFramework


[ Top ]


Class Variables

protected object IsterObjectChecker $checker
protected object IsterSessionObject $container
[ Top ]



Class Methods


constructor IsterACLProtector

IsterACLProtector IsterACLProtector( )

Constructor

[ Top ]

method check

boolean check( [string $access = 'r'])

Check if the requested access is granted.

If $this->uid is an IsterACLIdentity this method will first check if this identity has an attribute "role". Then it will check if the ACL has an entry for "role.<name-of-role>" and the requested access method. Next it will check for an entry "user.<name-of-identity>" and then for an entry of the UID of the identity. If $this->uid is a string or number, only this check will be performed.

If no UID has been set or found, false will be returned.


Parameters:

string   $access  

[ Top ]

method setACL

boolean setACL( IsterACL $acl)

Set the IsterACL object.

Parameters:

IsterACL   $acl  

[ Top ]

method setContainer

boolean setContainer( IsterSessionObject &$container, string $uidname)

Set the container object.

Return false if no UID could be found in the container.


Parameters:

IsterSessionObject   &$container  
string   $uidname   name of the identity attribute in container

[ Top ]

method setUID

boolean setUID( mixed $uid)

Set the UID.

Parameters:

mixed   $uid   string or object IsterACLIdentity

[ Top ]


Documentation generated on Tue, 20 Dec 2005 11:20:22 +0100 by phpDocumentor 1.3.0RC4