strAclName = (string) $strName; } /** * Get the acl name * * @param void * @return string The name of the acl */ public function getAclName() { return (string) $this->strAclName; } /** * Add a new permission to the pool * * @param string $strName The name of the permission * @param void */ public function setPermissions($strName) { $this->arrPermissions[] = (string) $strName; // remove duplicate permissions $this->arrPermissions = array_unique($this->arrPermissions); } /** * Get all permissions * * @param void * @return array An array with all registered permissions */ public function getPermissions() { return (array) $this->arrPermissions; } /** * Create the acl object and set the name * * @param string $strName The name of the acl object * @return this */ public function __construct($strName='') { $this->setAclName($strName); return $this; } /** * Add a group/role to the acl object * * @param string $strGroupName The name of the group * @param string|bool $strInheritFrom Defines if you want to inherit from another group * @return this Returns the object so you can use method chaining. */ public function addGroup($strGroupName, $strInheritFrom=false) { // hier, wie soll ich das am besten implementieren? return $this; } /** * Allows a group the access to a ressource * * @param string $strGroupName The name of the group * @param array $arrPermissions An array with all allowed permissions * @return this Returns the object so you can use method chaining. */ public function allow($strGroupName, array $arrPermissions) { return $this; } /** * Denys a group the access to a ressource * * @param string $strGroupName The name of the group * @param array $arrPermissions An array with all denies permissions * @return this Returns the object so you can use method chaining. */ public function deny($strGroupName, array $arrPermissions) { return $this; } /** * Check if a group is allowed to access a permission * * @param string $strGroupName The name of the group * @oaram string $strPermission The name of the permission * @return bool Return true if the user has the permission, otherwize false */ public function isAllowed($strGroupName, $strPermission) { } } ?>