namespaceLoader = $namespaceLoader; } public function register(array $data) { /* load "psr-4", "psr-0", "classmap" */ $this->namespaceLoader->register($data); /* load "autoloadFileList" */ $this->registerAutoloadFileList($data); /* load "files" */ $this->registerFiles($data); } protected function registerAutoloadFileList(array $data) { $keyName = 'autoloadFileList'; if (!isset($data[$keyName])) { return; } foreach ($data[$keyName] as $filePath) { if (file_exists($filePath)) { require_once($filePath); } } } protected function registerFiles(array $data) { $keyName = 'files'; if (!isset($data[$keyName])) { return; } foreach ($data[$keyName] as $id => $filePath) { if (file_exists($filePath)) { require_once($filePath); } } } }