public function addRole($role, array $resources = [])
    {
        if ($role instanceof RoleInterface) {
            $this->roles[$role->getName()] = $role;
        } else {
            $role = new Role($role, $resources);
            $this->roles[$role->getName()] = $role;
        }
    }