Overview

Class for reading access privileges from a text file.

The file format is ...

0:flag 1:type 2:name 3:class 4:action

For example ...

deny handle * * * * 
allow role sysadmin * * * 
allow handle + Solar_App_Bookmarks * * 
deny handle boshag Solar_App_Bookmarks edit *

Package

This class is part of the Solar_Access package.

Inheritance:

Configuration Keys

  • owner_method: An array of key-value pairs to map object class to a method in that class to determine if a user is the owner of that object. The key is the class name, the value is the method name within that class.

  • file: The path to the access file.

Constants

None.

Public Properties

These are all the public properties in the Solar_Access_Adapter_File class.

You can also view the list of all public, protected, and private properties.

$list

The access list for a handle and roles.

Public Methods

These are all the public methods in the Solar_Access_Adapter_File class.

You can also view the list of all public, protected, and private methods.

__construct()

Constructor.

__destruct()

Default destructor; does nothing other than provide a safe fallback for calls to parent::__destruct().

dump()

Convenience method for getting a dump the whole object, or one of its properties, or an external variable.

fetch()

Fetch access privileges for a user handle and roles.

isAllowed()

Tells whether or not to allow access to a class/action/process combination.

isOwner()

Checks to see if the current user is the owner of a particular object.

load()

Fetches the access list from the adapter into $this->list.

locale()

Looks up class-specific locale strings based on a key.

reset()

Resets the current access controls to a blank array, along with the $_auth and $_role properties.



Local