protected function loadModules() { $moduleMask = implode(DIRECTORY_SEPARATOR, array($this->appPath->root(), "src", $this->contextName . "Module.php")); foreach ($this->fileSystem->glob($moduleMask) as $filePath) { /** @var IModule $class */ $class = $this->fileSystem->loadClass($filePath); $class->build($this->containerBuilder); } }
/** * Loads module class. * * @param string $filePath Path to module file. * * @return IModule Loaded module class instance. */ protected function loadModule($filePath) { return $this->fileSystem->loadClass($filePath); }