public function createProxyEvent(Event $event)
    {
        if ($event instanceof GetResponseForControllerResultEvent) {
            $silexEvent = new PostDispatchEvent($event);

        } elseif ($event instanceof GetResponseEvent) {
            $silexEvent = new RequestEvent($event);

        } elseif ($event instanceof FilterControllerEvent) {
            $silexEvent = new PreDispatchEvent($event);

        } elseif ($event instanceof FilterResponseEvent) {
            $silexEvent = new ResponseEvent($event);

        } elseif ($event instanceof SfPostResponseEvent) {
            $silexEvent = new PostResponseEvent($event);

        } elseif ($event instanceof FinishRequestEvent) {
            $silexEvent = new PostRequestEvent($event);

        } elseif ($event instanceof KernelEvent) {
            $silexEvent = new SilexKernelEvent($event);

        } elseif ($event instanceof Event) {
            $silexEvent = new SilexEvent($event);

        } else {
            $silexEvent = null; // unknown event
        }

        return $silexEvent;
    }
public function createProxyEvent(Event $event)
    {
        if ($event instanceof GetResponseForControllerResultEvent) {
            $silexEvent = new PostDispatchEvent($event);

        } elseif ($event instanceof GetResponseEvent) {
            $silexEvent = new RequestEvent($event);

        } elseif ($event instanceof FilterControllerEvent) {
            $silexEvent = new PreDispatchEvent($event);

        } elseif ($event instanceof FilterResponseEvent) {
            $silexEvent = new ResponseEvent($event);

        } elseif ($event instanceof SfPostResponseEvent) {
            $silexEvent = new PostResponseEvent($event);

        } elseif ($event instanceof FinishRequestEvent) {
            $silexEvent = new PostRequestEvent($event);

        } elseif ($event instanceof KernelEvent) {
            $silexEvent = new SilexKernelEvent($event);

        } elseif ($event instanceof Event) {
            $silexEvent = new SilexEvent($event);

        } else {
            $silexEvent = null; // unknown event
        }

        return $silexEvent;
    }
public function createProxyEvent ( Event $ event ) { if ( $ event instanceof GetResponseForControllerResultEvent ) { $ silexEvent = new PostDispatchEvent ( $ event ) ; } elseif ( $ event instanceof GetResponseEvent ) { $ silexEvent = new RequestEvent ( $ event ) ; } elseif ( $ event instanceof FilterControllerEvent ) { $ silexEvent = new PreDispatchEvent ( $ event ) ; } elseif ( $ event instanceof FilterResponseEvent ) { $ silexEvent = new ResponseEvent ( $ event ) ; } elseif ( $ event instanceof SfPostResponseEvent ) { $ silexEvent = new PostResponseEvent ( $ event ) ; } elseif ( $ event instanceof FinishRequestEvent ) { $ silexEvent = new PostRequestEvent ( $ event ) ; } elseif ( $ event instanceof KernelEvent ) { $ silexEvent = new SilexKernelEvent ( $ event ) ; } elseif ( $ event instanceof Event ) { $ silexEvent = new SilexEvent ( $ event ) ; } else { $ silexEvent = null ; // unknown event } return $ silexEvent ; }
Create proxy event for given Symfony dispatcher event

@param Event $event

@return EventInterface
Create proxy event for given Symfony dispatcher event