ZendFramework2

提供: wikipokpok
移動先: 案内検索

レイアウトを無効にする[編集]

https://framework.zend.com/manual/2.4/en/modules/zend.view.quick-start.html

   public function doSomethingCrazyAction()
   {
       $view = new ViewModel(array(
           'message' => 'Hello world',
       ));
       // Disable layouts; `MvcEvent` will use this View Model instead
       $view->setTerminal(true);
       return $view;
   }