本文整理汇总了PHP中Symfony\Bundle\FrameworkBundle\Controller\Controller::stream方法的典型用法代码示例。如果您正苦于以下问题:PHP Controller::stream方法的具体用法?PHP Controller::stream怎么用?PHP Controller::stream使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Symfony\Bundle\FrameworkBundle\Controller\Controller
的用法示例。
在下文中一共展示了Controller::stream方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testStreamTemplating
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'));
}
示例2: stream
/**
* 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);
}
示例3: stream
public function stream($view, array $parameters = array(), StreamedResponse $response = null)
{
return parent::stream($view, $parameters, $response);
}