API16:JRule/mergeIdentity
From Joomla! Documentation
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.
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 />
