複数のモジュールで作業したいです。したがって私はphalconコマンドfrontend
とbackend
モジュールを使って作成しました。 (私はこの中に入れた:私はこのコードを追加することによって、新しいモジュールを登録する必要がありました。このドキュメントによると - このコマンドphalcon module frontend
を使用するには、私はphalconのドキュメントに従って始めた使用後config.php
カルコン複数モジュールが動作しません
'modulesDir' => APP_PATH . '/app/modules/',
にラインを書くためには、このコマンドを持っていましたfrontend
- 私は、モジュールをデフォルトにroutes
を更新して行わこのacctions後index.php
)
$application->registerModules(
array(
'frontend' => function ($di) use ($view) {
$di->setShared('view', function() use ($view) {
$view->setViewsDir('../apps/frontend/views/');
return $view;
});
},
'backend' => function ($di) use ($view) {
$di->setShared('view', function() use ($view) {
$view->setViewsDir('../apps/backend/views/');
return $view;
});
}
)
);
。
最後に、その後私は、この通知を受け取る:
インデックスコントローラでIndexController handler class cannot be loaded
私はそれが正しく動作し、私は何を修正するか、改善すべきnamespace Application\Frontend\Controllers;
を置きますか? ありがとうございます。
IndexControllerのファイル名は何ですか?私はindexController.phpまたはIndexController.phpを意味するIndexController.php ここでは、マルチモジュールmvc用のphalconコマンドツールグラブです。すべてのモジュールでregisterModules関数とModules.phpを見てください https://github.com/phalcon/mvc/tree/master/multiple –
gitのソースを提供して問題の可能性がある箇所を確認できますか? –
そうでなければ、私は準備ができた複数のモジュールを使うことができますが、私はphalconコマンドを使います。私はなぜそれがエラーを返すか知りたいと思っています。 – betty39johnson