public function __construct($name, SystemContext $context, $dir) { $this->_context = new Context($context, $dir); // ConfigPathを設定 $configPath = $this->_context->getFilePath('config'); // Configを作成 $this->_config = Configuration::build('module.' . $name, $configPath, $context->getVal('env'), $useCache = false); // AutoLoader $ns = $this->_config->read('namespace', $context->getService('config')->read('module.namespace') . '\\' . ucfirst($name)); $this->_context->setVal('ns', $ns); $context->getService('autoloader')->register([$ns . '\\Controller' => $this->_context->getFilePath('controller'), $this->_context->getFilePath('lib')]); }