/**
* Merges the values for an identity.
*
* @param integer $identity The identity.
* @param boolean $allow The value for the identity (true == allow, false == deny).
*
* @return void
*
* @since 1.7.0
*/
public function mergeIdentity($identity, $allow)
{
$identity = (int) $identity;
$allow = (int) (bool) $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;
}
}