Class Xyster_Controller_Plugin_Acl

Description

Authorization plugin

  • copyright: Copyright (c) 2007-2008 Irrational Logic (http://irrationallogic.net)
  • license: New BSD License

Located in /Controller/Plugin/Acl.php (line 42)

Zend_Controller_Plugin_Abstract
   |
   --Xyster_Controller_Plugin_Acl
Variable Summary
Method Summary
Xyster_Controller_Plugin_Acl __construct ( $acl)
Xyster_Controller_Action_Helper_Acl allow (Zend_Acl_Role_Interface|string $role, [string $module = null], [string $controller = null], [string $action = null])
Xyster_Controller_Action_Helper_Acl deny (Zend_Acl_Role_Interface|string $role, [string $module = null], [string $controller = null], [string $action = null])
void dispatchLoopStartup ( $request)
string getLoginAction ()
string getLoginController ()
string getLoginModule ()
void preDispatch ( $request)
Xyster_Controller_Plugin_Acl setAccessDenied (string $module, string $controller, string $action)
Xyster_Controller_Plugin_Acl setLogin (string $module, string $controller, string $action)
Xyster_Controller_Request_Resource _getResource (string $module, string $controller, string $action)
Variables
Zend_Acl $_acl (line 49)

The acl

  • access: protected
string $_deniedAction = 'error' (line 55)

Action to use for errors; defaults to 'error'

  • access: protected
string $_deniedController = 'error' (line 61)

Controller to use for errors; defaults to 'error'

  • access: protected
string $_deniedModule (line 67)

Module to use for errors; defaults to default module in dispatcher

  • access: protected
string $_loginAction = 'index' (line 73)

Action to use for login; defaults to 'index'

  • access: protected
string $_loginController = 'login' (line 79)

Controller to use for login; defaults to 'login'

  • access: protected
string $_loginModule (line 85)

Module to use for login; defaults to default module in dispatcher

  • access: protected
array $_rules = array() (line 92)

Holds the rules passed to 'setRules' until dispatchLoopStartup

  • access: protected
Methods
Constructor __construct (line 99)

Creates a new acl plugin

  • access: public
Xyster_Controller_Plugin_Acl __construct ( $acl)
  • Zend_Acl $acl
allow (line 122)

Allows access to an action by a role

Passing null for the role will allow all users to access the action.

Passing null for the module will allow the role access to all actions in all controllers in all modules. Specifying a module but leaving controller and action null will allow access to all actions in all controllers in the specified module. Specifying a module and a controller but leaving action null will allow access to all actions in the specified controller.

  • return: provides a fluent interface
  • access: public
Xyster_Controller_Action_Helper_Acl allow (Zend_Acl_Role_Interface|string $role, [string $module = null], [string $controller = null], [string $action = null])
  • Zend_Acl_Role_Interface|string $role
  • string $module: The module name
  • string $controller: The controller name
  • string $action: The action name
deny (line 146)

Denies access to an action by a role

Passing null for the role will deny all users access to the action.

Passing null for the module will deny everything to the role supplied. Specifying a module but leaving controller and action null will deny access to all controllers in the specified module. Specifying a module and a controller but leaving action null will deny access to all actions in the specified controller.

  • return: provides a fluent interface
  • access: public
Xyster_Controller_Action_Helper_Acl deny (Zend_Acl_Role_Interface|string $role, [string $module = null], [string $controller = null], [string $action = null])
  • Zend_Acl_Role_Interface|string $role
  • string $module: The module name
  • string $controller: The controller name
  • string $action: The action name
dispatchLoopStartup (line 158)

Called before Zend_Controller_Front enters its dispatch loop

  • access: public
void dispatchLoopStartup ( $request)
  • Zend_Controller_Request_Abstract $request
getAccessDeniedAction (line 179)

Retrieve the current acl plugin action

  • access: public
string getAccessDeniedAction ()
getAccessDeniedController (line 189)

Retrieve the current acl plugin controller

  • access: public
string getAccessDeniedController ()
getAccessDeniedModule (line 199)

Retrieve the current acl plugin module

  • access: public
string getAccessDeniedModule ()
getLoginAction (line 213)

Retrieve the current not-authenticated action

  • access: public
string getLoginAction ()
getLoginController (line 223)

Retrieve the current not-authenticated controller

  • access: public
string getLoginController ()
getLoginModule (line 233)

Retrieve the current not-authenticated module

  • access: public
string getLoginModule ()
preDispatch (line 247)

Called before an action is dispatched by Zend_Controller_Dispatcher.

  • access: public
void preDispatch ( $request)
  • Zend_Controller_Request_Abstract $request
setAccessDenied (line 310)

Setup the dispatch location for access denied errors

  • return: provides a fluent interface
  • access: public
Xyster_Controller_Plugin_Acl setAccessDenied (string $module, string $controller, string $action)
  • string $module
  • string $controller
  • string $action
setLogin (line 327)

Setup the dispatch location for unauthenticated users

  • return: provides a fluent interface
  • access: public
Xyster_Controller_Plugin_Acl setLogin (string $module, string $controller, string $action)
  • string $module
  • string $controller
  • string $action
setRules (line 354)

Sets multiple rules simultaneously

Each element in the $rules array should be itself an associative array containing the following keys:

  • type : either Zend_Acl::TYPE_ALLOW or Zend_Acl::TYPE_DENY
  • role : the string role ID
  • module : the module name
  • controller : the controller name
  • action : the action name
If 'type' is omitted or is null, Zend_Acl::TYPE_ALLOW is assumed. If any of the other keys are omitted, null is assumed. See allow and deny for the behavior when null is specified for these values.

  • return: provides a fluent interface
  • access: public
Xyster_Controller_Plugin_Acl setRules ( $rules)
  • array $rules
_getResource (line 368)

Gets the resource object

  • access: protected
Xyster_Controller_Request_Resource _getResource (string $module, string $controller, string $action)
  • string $module
  • string $controller
  • string $action

Documentation generated on Mon, 19 May 2008 17:06:57 -0400 by phpDocumentor 1.4.2