getServiceManager()->get(ResultServerService::SERVICE_ID); $resultStorage = $resultServerService->getOption(ResultServerService::OPTION_RESULT_STORAGE); $fileSystemName = 'taoResultServer'; $outcomeFileSystemRepository = new OutcomeFilesystemRepository( [ OutcomeFilesystemRepository::OPTION_STORAGE => $resultStorage, OutcomeFilesystemRepository::OPTION_FILESYSTEM => $fileSystemName ] ); $resultServerService->setOption( ResultServerService::OPTION_RESULT_STORAGE, OutcomeFilesystemRepository::SERVICE_ID ); $this->getServiceManager()->register(OutcomeFilesystemRepository::SERVICE_ID, $outcomeFileSystemRepository); $this->getServiceManager()->register(ResultServerService::SERVICE_ID, $resultServerService); /** @var FileSystemService $fileSystemService */ $fileSystemService = $this->getServiceManager()->get(FileSystemService::SERVICE_ID); $fileSystemService->createFileSystem($fileSystemName); $this->getServiceManager()->register(FileSystemService::SERVICE_ID, $fileSystemService); return new Report(Report::TYPE_SUCCESS, 'File system storage enabled.'); } }