Zend Framework でカスタム ルートの定義を短縮するにはどうすればよいですか? 私は現在これを定義として持っています:
$route = new Zend_Controller_Router_Route(
":module/:id",
array(
"controller" => "index",
"action" => "index"
),
array("id" => "\d+")
);
self::$frontController->getRouter()->addRoute('shortcutOne', $route);
$route = new Zend_Controller_Router_Route(
":module/:controller/:id",
array("action" => "index"),
array("id" => "\d+")
);
self::$frontController->getRouter()->addRoute('shortcutTwo', $route);
$route = new Zend_Controller_Router_Route(
":module/:controller/:action/:id",
null,
array("id" => "\d+")
);
self::$frontController->getRouter()->addRoute('shortcutThree', $route);
これらのルールをより適切に組み合わせる方法はありますか? また、これらを配置する際のベスト プラクティスは何ですか? 私は現在、フロントコントローラーの初期化直後にブートストラップクラスにそれらを持っています。