Phalcon\Acl\Adapter\Redis::addInherit PHP Метод

addInherit() публичный Метод

public addInherit ( string $roleName, Phalcon\Acl\Role | string $roleToInherit )
$roleName string
$roleToInherit Phalcon\Acl\Role | string
    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));
        }
        if ($roleToInherit instanceof Role) {
            $roleToInherit = $roleToInherit->getName();
        }
        $this->redis->sAdd("rolesInherits:{$roleName}", $roleToInherit);
    }