ご存知のように、Zend Framework (v1.10) は、スラッシュで区切られたパラメーターに基づくルーティングを使用します。
[server]/controllerName/actionName/param1/value1/param2/value2/
問題は次のとおりです: Zend Framework に、標準の PHP クエリ文字列を使用してアクションとコントローラー名を取得させる方法、この場合:
[server]?controller=controllerName&action=actionName¶m1=value1¶m2=value2
私はもう試した:
protected function _initRequest()
{
// Ensure the front controller is initialized
$this->bootstrap('FrontController');
// Retrieve the front controller from the bootstrap registry
$front = $this->getResource('FrontController');
$request = new Zend_Controller_Request_Http();
$request->setControllerName($_GET['controller']);
$request->setActionName($_GET['action']);
$front->setRequest($request);
// Ensure the request is stored in the bootstrap registry
return $request;
}
しかし、それは私にはうまくいきませんでした。