/** * Gets the 'fos_rest.view_handler' service. * * This service is shared. * This method always returns the same instance of the service. * * @return \FOS\RestBundle\View\ViewHandler A FOS\RestBundle\View\ViewHandler instance */ protected function getFosRest_ViewHandlerService() { $this->services['fos_rest.view_handler'] = $instance = new \FOS\RestBundle\View\ViewHandler($this->get('router'), $this->get('fos_rest.serializer'), $this->get('templating'), $this->get('request_stack'), array('json' => false, 'html' => true), 400, 204, false, array('html' => 302), 'twig'); $instance->setSerializeNullStrategy(true); return $instance; }
/** * Gets the 'fos_rest.view_handler' service. * * This service is shared. * This method always returns the same instance of the service. * * @return \FOS\RestBundle\View\ViewHandler A FOS\RestBundle\View\ViewHandler instance. */ protected function getFosRest_ViewHandlerService() { $this->services['fos_rest.view_handler'] = $instance = new \FOS\RestBundle\View\ViewHandler(array('json' => false, 'xml' => false, 'html' => true), 400, 204, false, array('html' => 302), 'twig'); $instance->setExclusionStrategyGroups(''); $instance->setExclusionStrategyVersion(''); $instance->setSerializeNullStrategy(false); $instance->setContainer($this); return $instance; }
protected function getFosRest_ViewHandlerService() { $this->services['fos_rest.view_handler'] = $instance = new \FOS\RestBundle\View\ViewHandler($this->get('router'), $this->get('jms_serializer'), $this->get('templating'), $this->get('request_stack'), $this->get('fos_rest.exception_handler'), array('xml' => false, 'json' => false, 'html' => true), 400, 204, false, array('html' => 302), 'twig'); $instance->setSerializationContextAdapter(new \FOS\RestBundle\Context\Adapter\ChainContextAdapter(array(0 => new \FOS\RestBundle\Context\Adapter\JMSContextAdapter(), 1 => new \FOS\RestBundle\Context\Adapter\ArrayContextAdapter()))); $instance->setSerializeNullStrategy(false); return $instance; }