Zend Framework コードリーディング (1)
コントローラ内からアクセスできるオブジェクトなどです。
$this->_helper->layout
- Zend_Layout_Controller_Action_Helper_Layout のインスタンス
- disableLayout() でレイアウトを抑制できます
$this->_helper->viewRenderer
$this->view->assign($name, $value)
- 配列、ハッシュ、オブジェクトなどをビューに渡すとき
- 文字列のときは $this->view->hoge = "xxxx"; でいけます
$this->view->render($template_path)
$this->getRequest()
$this->_forward($action_name)
- 同じコントローラ内の別アクションを呼べます
- 呼んだら戻ってこないので注意
$this->_forward($action_name, $controller_name)
- 別のコントローラ内の任意のアクションを呼べます
- 呼んだら戻ってこないので注意
$this->_redirect($uri)
- リダイレクトします
- 呼んだら戻ってこないので注意