WFuserdata . '/tmp/' . $config->WFdbname); $serviceCacheFile = $cacheConfig->getServiceCacheFile(); $factoryServiceMap = @include $serviceCacheFile; if (!is_file($serviceCacheFile)) { // Installer ausführen, wenn ServiceMap nicht vorhanden ist $resolver = new Psr4ClassNameResolver(); $resolver->addNamespace('Xentral\\', __DIR__); $resolver->excludeFile(__DIR__ . DIRECTORY_SEPARATOR . 'bootstrap.php'); $generator = new ClassMapGenerator($resolver, __DIR__); $installer = new Installer($generator, $resolver); $writer = new InstallerCacheWriter($cacheConfig, $installer); $writer->writeServiceCache(); $writer->writeJavascriptCache(); // Erzeugte ServiceMap einbinden $factoryServiceMap = @include $serviceCacheFile; if ($factoryServiceMap === false) { throw new RuntimeException(sprintf( 'Cache-Datei "%s" konnte nicht erzeugt werden. Vermutlich fehlen Schreibrechte in %s', $serviceCacheFile, $this->config->getUserDataTempDir() )); } } $registry = new ServiceRegistry(); $registry->add('ServiceContainer', new ServiceContainer($registry)); $registry->addFactories($factoryServiceMap); return $registry;