Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
SourceFileGeneratorPool.php
Go to the documentation of this file.
1 <?php
8 
15 {
21  private $fileGeneratorTypes;
22 
28  public function __construct(array $fileGeneratorTypes = [])
29  {
30  $this->fileGeneratorTypes = $fileGeneratorTypes;
31  }
32 
40  public function create($generatorType)
41  {
42  if (!$this->fileGeneratorTypes[$generatorType]) {
43  throw new \LogicException('Wrong file generator type!');
44  }
45 
46  return $this->fileGeneratorTypes[$generatorType];
47  }
48 }