Zend ビュー ヘルパーには、ルーティング テーブルに基づいて URL を出力するための関数 url() があります。
$this->url(array('controller' => 'comments', 'action' => 'add')
コントローラーで同じことを行うにはどうすればよいですか? 特に、標準の URL ではなくコントローラー/アクション構文を使用して、Zend フォームのアクション URL を設定したいと考えています。
$form = new Zend_Form;
$form->setMethod('post')->setAction( $this->url(array('controller' => 'comments', 'action' => 'add')) );