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')]); }
public function __construct(SystemContext $context) { $this->_context = $context; $this->_module_dir = $context->getFilePath($context->getService('config')->read('module.dir', 'modules')); }
public function __construct(Context $context) { $this->_context = $context; $this->_debugger = $context->getService('debugger'); $this->_output = $context->getService('output'); }