class JRules


Located at : UKNOWVA_ROOT/libraries/joomla/access/rules.php

JRules class.

Methods

__construct(mixed $input = '')

Constructor.

array
getData()

Get the data for the action.

void
mergeCollection(mixed $input)

Method to merge a collection of JRules.

void
merge(mixed $actions)

Method to merge actions with this object.

void
mergeAction(string $action, array $identities)

Merges an array of identities for an action.

mixed
allow(string $action, mixed $identity)

Checks that an action can be performed by an identity.

object
getAllowed(mixed $identity)

Get the allowed actions for an identity.

string
__toString()

Magic method to convert the object to JSON string representation.

Details

at line 43
JRules __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

mixed $input A JSON format string (probably from the database) or a nested array.

Return Value

JRules

at line 69
array getData()

Get the data for the action.

Return Value

array A named array of JRule objects.

at line 83
void mergeCollection(mixed $input)

Method to merge a collection of JRules.

Parameters

mixed $input JRule or array of JRules

Return Value

void

at line 103
void merge(mixed $actions)

Method to merge actions with this object.

Parameters

mixed $actions JRule object, an array of actions or a JSON string array of actions.

Return Value

void

at line 135
void mergeAction(string $action, array $identities)

Merges an array of identities for an action.

Parameters

string $action The name of the action.
array $identities An array of identities

Return Value

void

at line 160
mixed allow(string $action, mixed $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

string $action The name of the action.
mixed $identity An integer representing the identity, or an array of identities

Return Value

mixed Object or null if there is no information about the action.

at line 179
object getAllowed(mixed $identity)

Get the allowed actions for an identity.

Parameters

mixed $identity An integer representing the identity or an array of identities

Return Value

object Allowed actions for the identity or identities

at line 199
string __toString()

Magic method to convert the object to JSON string representation.

Return Value

string JSON representation of the actions array