Actions

API16

JRules/ construct

< API16:JRules

The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Description

Constructor.



Syntax

__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);
                }
        }
}



Examples

Code Examples


Advertisement