Actions

API16

JRule/mergeIdentity

From Joomla! Documentation

< API16:JRule
Revision as of 17:34, 22 March 2010 by Doxiki (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Contents

Description

Merges the value for an identity.

[Edit Descripton]

Description:JRule/mergeIdentity

Syntax

mergeIdentity($identity, $allow)
Parameter Name Default Value Description
$identity The identity.
$allow The value for the identity (true == allow, false == deny).

Defined in

libraries/joomla/access/rule.php

Importing

jimport( 'joomla.access.rule' );

Source Body

public function mergeIdentity($identity, $allow)
{
        $identity       = (int) $identity;
        $allow          = (int) ((boolean) $allow);
 
        // Check that the identity exists.
        if (isset($this->_data[$identity]))
        {
                // Explicit deny always wins a merge.
                if ($this->_data[$identity] !== 0) {
                        $this->_data[$identity] = $allow;
                }
        }
        else {
                $this->_data[$identity] = $allow;
        }
}

[Edit See Also] SeeAlso:JRule/mergeIdentity

Examples

<CodeExamplesForm />