ベースブートストラップとモジュールブートストラップを持つ方法はありますか?
これは私のアプリの構造です
- application
- modules
- admin
- controllers
- Bootstrap.php
- public
- controllers
- Bootstrap.php
- Bootstrap.php
- libraries
アプリをテストすると、ベース ブートストラップのみが実行されます。これでモジュールブートストラップの実行を強制しました(ベースブートストラップで):
$modules = array('admin', 'public');
foreach ($modules as $module) {
$path = APP_PATH . '/modules/' . $module . '/Bootstrap.php';
$class = ucfirst($module) . '_Bootstrap.php';
include_once $path;
$bootstrap = new $class($this);
$bootstrap->bootstrap();
}
これだけで、モジュールのブートストラップを実行できます。別の方法はありますか?