src/Auth/Acl.php
private function _loadRoles(array $aclConfig)
	{
		foreach ($aclConfig as $role => $acl) {
			if (isset($acl[self::CONFIG_FIELD_RESOURCE])
				and is_array($acl[self::CONFIG_FIELD_RESOURCE])) {
				$this->_roles[$role] = $acl[self::CONFIG_FIELD_RESOURCE];
			} else {
				$this->_roles[$role] = array();
			}

			if (isset($acl[self::CONFIG_FIELD_INHERIT])
				and is_array($acl[self::CONFIG_FIELD_INHERIT])) {
				foreach ($acl[self::CONFIG_FIELD_INHERIT] as $inherit) {
					if (isset($aclConfig[$inherit][self::CONFIG_FIELD_RESOURCE])
						and is_array($aclConfig[$inherit][self::CONFIG_FIELD_RESOURCE])) {
						$this->_roles[$role] = array_merge($this->_roles[$role], $aclConfig[$inherit][self::CONFIG_FIELD_RESOURCE]);
					}
				}
			}
		}

		return $this->_roles;
	}
private function _loadRoles(array $aclConfig)
	{
		foreach ($aclConfig as $role => $acl) {
			if (isset($acl[self::CONFIG_FIELD_RESOURCE])
				and is_array($acl[self::CONFIG_FIELD_RESOURCE])) {
				$this->_roles[$role] = $acl[self::CONFIG_FIELD_RESOURCE];
			} else {
				$this->_roles[$role] = array();
			}

			if (isset($acl[self::CONFIG_FIELD_INHERIT])
				and is_array($acl[self::CONFIG_FIELD_INHERIT])) {
				foreach ($acl[self::CONFIG_FIELD_INHERIT] as $inherit) {
					if (isset($aclConfig[$inherit][self::CONFIG_FIELD_RESOURCE])
						and is_array($aclConfig[$inherit][self::CONFIG_FIELD_RESOURCE])) {
						$this->_roles[$role] = array_merge($this->_roles[$role], $aclConfig[$inherit][self::CONFIG_FIELD_RESOURCE]);
					}
				}
			}
		}

		return $this->_roles;
	}
private function _loadRoles ( array $ aclConfig ) { foreach ( $ aclConfig as $ role => $ acl ) { if ( isset ( $ acl [ self :: CONFIG_FIELD_RESOURCE ] ) and is_array ( $ acl [ self :: CONFIG_FIELD_RESOURCE ] ) ) { $ this -> _roles [ $ role ] = $ acl [ self :: CONFIG_FIELD_RESOURCE ] ; } else { $ this -> _roles [ $ role ] = array ( ) ; } if ( isset ( $ acl [ self :: CONFIG_FIELD_INHERIT ] ) and is_array ( $ acl [ self :: CONFIG_FIELD_INHERIT ] ) ) { foreach ( $ acl [ self :: CONFIG_FIELD_INHERIT ] as $ inherit ) { if ( isset ( $ aclConfig [ $ inherit ] [ self :: CONFIG_FIELD_RESOURCE ] ) and is_array ( $ aclConfig [ $ inherit ] [ self :: CONFIG_FIELD_RESOURCE ] ) ) { $ this -> _roles [ $ role ] = array_merge ( $ this -> _roles [ $ role ] , $ aclConfig [ $ inherit ] [ self :: CONFIG_FIELD_RESOURCE ] ) ; } } } } return $ this -> _roles ; }
Load the roles from the ACL configuration file.

@param array $aclConfig Roles and Resources configuration
@return array
Load the roles from the ACL configuration file .