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;
    }