fileGeneratorTypes = $fileGeneratorTypes; } /** * Create class instance * * @param string $generatorType * * @return SourceFileGeneratorInterface */ public function create($generatorType) { if (!$this->fileGeneratorTypes[$generatorType]) { throw new \LogicException('Wrong file generator type!'); } return $this->fileGeneratorTypes[$generatorType]; } }