/mycontroller/search を実行すると "/mycontroller" しか表示されませんが、メソッドにいるときに "/mycontroller/search" をsearch
取得するにはどうすればよいですか? メソッドにいるときに "/mycontroller/other" を取得するにはどうすればよいですかother
。
class Mycontroller extends Zend_Controller_Action
{
private $url = null;
public function otherAction() {
$this->url .= "/" . $this->getRequest()->getControllerName();
echo $this->url; // output: /mycontroller
exit;
}
public function searchAction() {
$this->url .= "/" . $this->getRequest()->getControllerName();
echo $this->url; // output: /mycontroller
// expect: /mycontroller/search
exit;
}
}