本文整理匯總了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);
}