Class JAccessRules
Direct known subclasses
JRules
Methods summary
public
|
#
__construct( mixed $input = '' )
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.
Parameters
- $input
mixed - $input A JSON format string (probably from the database) or a nested array.
Since
11.1
|
public
array
|
#
getData( )
Get the data for the action.
Get the data for the action.
Returns
array - A named array of JAccessRule objects.
Since
11.1
|
public
|
#
mergeCollection( mixed $input )
Method to merge a collection of JAccessRules.
Method to merge a collection of JAccessRules.
Parameters
- $input
mixed - $input JAccessRule or array of JAccessRules
Since
11.1
|
public
|
#
merge( mixed $actions )
Method to merge actions with this object.
Method to merge actions with this object.
Parameters
- $actions
mixed - $actions JAccessRule object, an array of actions or a JSON string array of
actions.
Since
11.1
|
public
|
#
mergeAction( string $action, array $identities )
Merges an array of identities for an action.
Merges an array of identities for an action.
Parameters
- $action
string - $action The name of the action.
- $identities
array - $identities An array of identities
Since
11.1
|
public
mixed
|
#
allow( string $action, mixed $identity )
Checks that an action can be performed by an identity.
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.
Parameters
- $action
string - $action The name of the action.
- $identity
mixed - $identity An integer representing the identity, or an array of identities
Returns
mixed - Object or null if there is no information about the action.
Since
11.1
|
public
JObject
|
#
getAllowed( mixed $identity )
Get the allowed actions for an identity.
Get the allowed actions for an identity.
Parameters
- $identity
mixed - $identity An integer representing the identity or an array of identities
Returns
JObject
- Allowed actions for the identity or identities
Since
11.1
|
public
string
|
#
__toString( )
Magic method to convert the object to JSON string representation.
Magic method to convert the object to JSON string representation.
Returns
string - JSON representation of the actions array
Since
11.1
|
Magic methods summary
Properties summary
protected
array
|
$data
|
#
A named array.
Since
11.1
|