public function onKernelEarlyRequest(GetResponseEvent $e)
    {
        $request = $e->getRequest();

        foreach ($this->pathConfig as $regex => $config) {
            if (preg_match($regex, $request->getPathInfo())) {
                $this->enabled = true;

                if (!$this->subscribed) {
                    $e->getDispatcher()->addSubscriber($this);
                    $this->subscribed = true;
                }

                //set other relevant values for this request
                $config['suppress_response_codes'] = ($config['allow_code_suppression']) ? $request->query->get('_suppress_codes', false) : false;
                $config['http_response_format'] = $request->get('_format', false);
                $config['negotiated'] = false;

                //subsequent listeners will check the request attributes for relevant configuration
                $request->attributes->set('_ac_web_service', $config);

                return;
            }
        }

        $this->enabled = false;
    }