/** * Checks if the specified permission's actions are "implied by" this object's actions. * @param Permission $permission * @return boolean */ public function implies(IPermission $permission) { if ($this->name != $permission->getName()) { return false; } return parent::implies($permission); }
/** * @param string $key * @param array $childs */ public function __construct($key, array $childs = []) { parent::__construct($key); $this->childs = $childs; }
/** * @param string $name * @param mixed $actions Array of string containing the actions for this permission. */ public function __construct($actions, $relatedObject = null) { parent::__construct(''); $this->actions = self::explodeActions($actions); $this->relatedObject = $relatedObject; }
/** * @param string $key * @param array $filters */ public function __construct($key, array $filters = []) { parent::__construct($key); $this->filters = $filters; }