public function isMethodAllowed($class, $method = null)
    {
        if (is_array($class)) {
            list($class, $method) = $class;
        }
        foreach ($this->allowedMethods as $allowedClass => $methods) {
            if (!isset($methods[$method])) {
                continue;
            }
            if ($class === $allowedClass || is_subclass_of($class, $allowedClass)) {
                return true;
            }
        }

        return false;
    }
public function isMethodAllowed($class, $method = null)
    {
        if (is_array($class)) {
            list($class, $method) = $class;
        }
        foreach ($this->allowedMethods as $allowedClass => $methods) {
            if (!isset($methods[$method])) {
                continue;
            }
            if ($class === $allowedClass || is_subclass_of($class, $allowedClass)) {
                return true;
            }
        }

        return false;
    }
public function isMethodAllowed ( $ class , $ method = null ) { if ( is_array ( $ class ) ) { list ( $ class , $ method ) = $ class ; } foreach ( $ this -> allowedMethods as $ allowedClass => $ methods ) { if ( ! isset ( $ methods [ $ method ] ) ) { continue ; } if ( $ class === $ allowedClass || is_subclass_of ( $ class , $ allowedClass ) ) { return true ; } } return false ; }
This is used at compile time to check whether static method calls are allowed or not.

@param mixed  $class  lowercased class name or array('class', 'method') couple
@param string $method lowercased method name

@return bool
This is used at compile time to check whether static method calls are allowed or not .