デフォルトモジュールのディレクトリを変更する方法を教えてください。私はZend Frameworkモジュラーディレクトリ構造を使用しています:デフォルトモジュールのディレクトリを変更してください
modules
default
controllers
IndexController.php
etc
other-module
しかし、どのようにデフォルトモジュールのディレクトリを変更できますか?私はそれがApiと呼ばれることを望みます。だから私は持っているでしょう:
modules
Api
controllers
IndexController.php
other-module
を私はURIが同じように滞在したい:モジュール/ API /コントローラ/ IndexController.phpへ
http://localhost
ウィルルートとindexActionを実行します。
この
は、私はあなたのconfig.iniresources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.modules[] = "default"
resources.modules[] = "api"
あなたのフォルダ構造では、ブートストラップ
protected function _initFrontController()
{
$front = Zend_Controller_Front::getInstance();
$front->addModuleDirectory(APPLICATION_PATH.'/modules');
return $front;
}
私はあなたのapllication.ini 'resources.frontController.moduleDirectory = APPLICATION_PATH"/modules/api "' – Rikesh