Class JAccessRules

Description

JAccessRules class.

  • since: 11.4

Located in /libraries/joomla/access/rules.php (line 19)


	
			
Direct descendents
Class Description
JRules Deprecated class placeholder. You should use JAccessRules instead.
Variable Summary
array $data
Method Summary
JAccessRules __construct ([mixed $input = ''])
mixed allow (string $action, mixed $identity)
object Allowed getAllowed (mixed $identity)
array getData ()
void merge (mixed $actions)
void mergeAction (string $action, array $identities)
void mergeCollection (mixed $input)
string __toString ()
Variables
array $data = array() (line 27)

A named array.

  • since: 11.1
  • access: protected
Methods
Constructor __construct (line 39)

Constructor.

The input array must be in the form: array('action' => array(-42 => true, 3 => true, 4 => false)) or an equivalent JSON encoded string, or an object where properties are arrays.

  • since: 11.1
  • access: public
JAccessRules __construct ([mixed $input = ''])
  • mixed $input: A JSON format string (probably from the database) or a nested array.

Redefined in descendants as:
allow (line 165)

Checks that an action can be performed by an identity.

The identity is an integer where +ve represents a user group, and -ve represents a user.

  • return: Object or null if there is no information about the action.
  • since: 11.1
  • access: public
mixed allow (string $action, mixed $identity)
  • string $action: The name of the action.
  • mixed $identity: An integer representing the identity, or an array of identities
getAllowed (line 185)

Get the allowed actions for an identity.

  • return: actions for the identity or identities
  • since: 11.1
  • access: public
object Allowed getAllowed (mixed $identity)
  • mixed $identity: An integer representing the identity or an array of identities
getData (line 68)

Get the data for the action.

  • return: A named array of JAccessRule objects.
  • since: 11.1
  • access: public
array getData ()
merge (line 103)

Method to merge actions with this object.

  • since: 11.1
  • access: public
void merge (mixed $actions)
  • mixed $actions: JAccessRule object, an array of actions or a JSON string array of actions.
mergeAction (line 138)

Merges an array of identities for an action.

  • since: 11.1
  • access: public
void mergeAction (string $action, array $identities)
  • string $action: The name of the action.
  • array $identities: An array of identities
mergeCollection (line 82)

Method to merge a collection of JAccessRules.

  • since: 11.1
  • access: public
void mergeCollection (mixed $input)
  • mixed $input: JAccessRule or array of JAccessRules
__toString (line 206)

Magic method to convert the object to JSON string representation.

  • return: JSON representation of the actions array
  • since: 11.1
  • access: public
string __toString ()

Documentation generated on Mon, 25 Jun 2012 13:59:21 -0500 by phpDocumentor 1.4.4