/** * {@inheritdoc} * * @param string $roleName * @param string $roleToInherit * @throws \Phalcon\Acl\Exception */ public function addInherit($roleName, $roleToInherit) { $exists = $this->redis->hGet("roles", $roleName); if (!$exists) { throw new Exception("Role '" . $roleName . "' does not exist in the role list"); } $this->redis->sAdd("rolesInherits:{$roleName}", $roleToInherit); }
/** * {@inheritdoc} * * @param string $roleName * @param string $roleToInherit * @throws \Phalcon\Acl\Exception */ public function addInherit($roleName, $roleToInherit) { $exists = $this->redis->hGet('roles', $roleName); if (!$exists) { throw new Exception(sprintf("Role '%s' does not exist in the role list", $roleName)); } $this->redis->sAdd("rolesInherits:{$roleName}", $roleToInherit); }