getUri(); // url filter provided and current request url does not match it if($this->url_pattern){ if(strpos($this->url_pattern, '/') === 0){ if(!preg_match($this->url_pattern, $url)) return; } else { if(stripos($url, $this->url_pattern) === false) return; } } switch($event_name){ case 'request.before_send': $this->onBeforeRequest($event); break; case 'request.sent': $this->onHeadersReceived($event); break; case 'curl.callback.write': $this->onCurlWrite($event); break; case 'request.complete': $this->onCompleted($event); break; } } // This method returns an array indexed by event names and whose values are either the method name to call // or an array composed of the method name to call and a priority. final public static function getSubscribedEvents(){ return array( 'request.before_send' => 'route', 'request.sent' => 'route', 'curl.callback.write' => 'route', 'request.complete' => 'route' ); } } ?>