src/core/ACL.php
public function check($role, $action = '*'): bool {
        if (is_array($role)) {
            foreach ($role as $r) {
                if ($this->match($r, $action))
                    return true;
            }

            return false;
        }

        return $this->match($role, $action);
    }
public function check($role, $action = '*'): bool {
        if (is_array($role)) {
            foreach ($role as $r) {
                if ($this->match($r, $action))
                    return true;
            }

            return false;
        }

        return $this->match($role, $action);
    }
public function check ( $ role , $ action = '*' ) : bool { if ( is_array ( $ role ) ) { foreach ( $ role as $ r ) { if ( $ this -> match ( $ r , $ action ) ) return true ; } return false ; } return $ this -> match ( $ role , $ action ) ; }
Check if a role (or one of roles) is allowed to an action.

@param mixed $role single role or array of roles
@param string $action
@return bool
Check if a role ( or one of roles ) is allowed to an action .