eZPublishCommunityProject  2012.12
eZ\Bundle\EzPublishRestBundle\EventListener\RestListener Class Reference

This class listens, as a service, for the kernel.view event, triggered when a controller method didn't return a Response object. More...

+ Inheritance diagram for eZ\Bundle\EzPublishRestBundle\EventListener\RestListener:
+ Collaboration diagram for eZ\Bundle\EzPublishRestBundle\EventListener\RestListener:

Public Member Functions

 __construct (ContainerInterface $container, RESTRequest $request)
 
 onKernelExceptionView (GetResponseForExceptionEvent $event)
 
 onKernelResultView (GetResponseForControllerResultEvent $event)
 

Static Public Member Functions

static getSubscribedEvents ()
 

Protected Member Functions

 isRestRequest (Request $request)
 
 visitResult ($result)
 

Private Attributes

 $container
 
 $request
 

Detailed Description

This class listens, as a service, for the kernel.view event, triggered when a controller method didn't return a Response object.

It converts the RestValue / Value Object to a Response using Visitors

Constructor & Destructor Documentation

eZ\Bundle\EzPublishRestBundle\EventListener\RestListener::__construct ( ContainerInterface  $container,
RESTRequest  $request 
)
Parameters
\Symfony\Component\DependencyInjection\ContainerInterface$container
\eZ\Publish\Core\REST\Server\Request$request

Member Function Documentation

static eZ\Bundle\EzPublishRestBundle\EventListener\RestListener::getSubscribedEvents ( )
static
Returns
array
eZ\Bundle\EzPublishRestBundle\EventListener\RestListener::isRestRequest ( Request  $request)
protected
eZ\Bundle\EzPublishRestBundle\EventListener\RestListener::onKernelExceptionView ( GetResponseForExceptionEvent  $event)
Parameters
\Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent$event
Exceptions
\Exception
Returns
void
eZ\Bundle\EzPublishRestBundle\EventListener\RestListener::onKernelResultView ( GetResponseForControllerResultEvent  $event)
Parameters
\Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent$event
Exceptions
\Exception
eZ\Bundle\EzPublishRestBundle\EventListener\RestListener::visitResult (   $result)
protected

Member Data Documentation

eZ\Bundle\EzPublishRestBundle\EventListener\RestListener::$container
private
eZ\Bundle\EzPublishRestBundle\EventListener\RestListener::$request
private

The documentation for this class was generated from the following file: