public function getUsers($name, ...$domain)
    {
        if (!$this->hasRole($name)) {
            throw new CasbinException('error: name does not exist');
        }

        $names = [];
        array_map(function ($role) use (&$names, $name) {
            if ($role->hasDirectRole($name)) {
                $names[] = $role->name;
            }
        }, $this->allRoles);

        return $names;
    }
public function getUsers($name, ...$domain)
    {
        if (!$this->hasRole($name)) {
            throw new CasbinException('error: name does not exist');
        }

        $names = [];
        array_map(function ($role) use (&$names, $name) {
            if ($role->hasDirectRole($name)) {
                $names[] = $role->name;
            }
        }, $this->allRoles);

        return $names;
    }
public function getUsers ( $ name , ... $ domain ) { if ( ! $ this -> hasRole ( $ name ) ) { throw new CasbinException ( 'error: name does not exist' ) ; } $ names = [ ] ; array_map ( function ( $ role ) use ( & $ names , $ name ) { if ( $ role -> hasDirectRole ( $ name ) ) { $ names [ ] = $ role -> name ; } } , $ this -> allRoles ) ; return $ names ; }
gets the users that inherits a subject.
domain is an unreferenced parameter here, may be used in other implementations.

@param string $name
@param mixed  ...$domain

@return array

@throws CasbinException
gets the users that inherits a subject . domain is an unreferenced parameter here may be used in other implementations .