Streams a view.
protected stream ( string $view, array $parameters = [], Symfony\Component\HttpFoundation\StreamedResponse $response = null ) : Symfony\Component\HttpFoundation\StreamedResponse | ||
$view | string | The view name |
$parameters | array | An array of parameters to pass to the view |
$response | Symfony\Component\HttpFoundation\StreamedResponse | A response instance |
return | Symfony\Component\HttpFoundation\StreamedResponse | A StreamedResponse instance |
public function testStreamTemplating() { $templating = $this->getMock('Symfony\\Component\\Routing\\RouterInterface'); $container = $this->getMock('Symfony\\Component\\DependencyInjection\\ContainerInterface'); $container->expects($this->at(0))->method('has')->willReturn(true); $container->expects($this->at(1))->method('get')->will($this->returnValue($templating)); $controller = new Controller(); $controller->setContainer($container); $this->assertInstanceOf('Symfony\\Component\\HttpFoundation\\StreamedResponse', $controller->stream('foo')); }
/** * Streams a view. * * @param string $view * The view name * @param array $parameters * An array of parameters to pass to the view * @param StreamedResponse $response * A response instance * @return StreamedResponse A StreamedResponse instance */ public function stream($view, array $parameters = array(), StreamedResponse $response = null) { $parameters = $this->decorateTranslator($parameters); return parent::stream($view, $parameters, $response); }
public function stream($view, array $parameters = array(), StreamedResponse $response = null) { return parent::stream($view, $parameters, $response); }