젠드 프레임 워크에서 내 커스텀 라우트의 정의를 어떻게 줄일 수 있습니까? 현재이 정의가 있습니다.젠드 프레임 워크 라우팅 정의 단축
$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);
이 규칙을 더 잘 조합 할 수있는 방법이 있습니까? 그리고 이들을 배치하는 가장 좋은 방법은 무엇입니까? 프론트 컨트롤러를 초기화 한 직후 부트 스트랩 클래스에 있습니다.
감사합니다. 난 그때 내 부트 스트랩 슬림을 유지하기 위해 구성을 사용합니다 :) –