JRules/ construct
From Joomla! Documentation
< JRules
Contents |
Description
Constructor.
Syntax
JRules::__construct($input= '')
| Parameter Name | Default Value | Description |
|---|---|---|
| $input | A JSON format string (probably from the database), or a nested array. |
Defined in
libraries/joomla/access/rules.php
Importing
jimport( 'joomla.access.rules' );
Source Body
public function __construct($input = '')
{
// Convert in input to an array.
if (is_string($input)) {
$input = json_decode($input, true);
}
else if (is_object($input)) {
$input = (array) $input;
}
if (is_array($input))
{
// Top level keys represent the actions.
foreach ($input as $action => $identities) {
$this->mergeAction($action, $identities);
}
}
}