Location: PHPKode > projects > Anahita Social Engine > dependencies/plg_system_socialengine/socialengine/model/acl/rules.php
<?php

class AnModelAclRules extends KObject
{
	/**
	 * 
	 * 
	 * @var array
	 */
	protected $_rules = array();
	
	/**
	 * 
	 * @return 
	 * @param $identifier Object
	 * @param $rule Object
	 */
	public function add($identifier, $rule)
	{
		settype($identifier, 'string');
		
		if ( !isset($this->_rules[$identifier]) )
			$this->_rules[$identifier] = array();				
		
		array_unshift($this->_rules[$identifier], $rule);
	}
	
	/**
	 * 
	 * @return 
	 * @param $idetnfier Object
	 */
	public function get($identifier)
	{
		settype($identifier, 'string');
		
		if ( !isset($this->_rules[$identifier]) ) 
			$this->_rules[$identifier] = array();

		return $this->_rules[$identifier];
	}
}
Return current item: Anahita Social Engine