Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
FrontendStorageConfigurationPool.php
Go to the documentation of this file.
1 <?php
7 namespace Magento\Catalog\Model;
8 
10 
19 {
23  private $storageConfigurations;
24 
29  public function __construct(array $storageConfigurations = [])
30  {
31  $this->storageConfigurations = $storageConfigurations;
32  }
33 
41  public function get($namespace)
42  {
43  if (isset($this->storageConfigurations[$namespace])) {
44  if (!$this->storageConfigurations[$namespace] instanceof FrontendStorageConfigurationInterface) {
45  throw new LocalizedException(
46  __(sprintf("Invalid pool type with namespace: %s", $namespace))
47  );
48  }
49  } else {
50  return false;
51  }
52 
53  return $this->storageConfigurations[$namespace];
54  }
55 }
__()
Definition: __.php:13