protected function checkHttpMethod(MvcEvent $event, $routeConfig)
    {
        $request = $event->getRequest();
        if (!$request instanceof HttpRequest) {
            return false;
        }

        if (isset($routeConfig['http_methods'])) {
            $methods = (array) $routeConfig['http_methods'];
            if (!in_array($request->getMethod(), $methods)) {
                return false;
            }
        }

        return true;
    }