Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ConverterPool.php
Go to the documentation of this file.
1 <?php
8 
10 {
14  protected $converters;
15 
19  protected $defaultConverterCode = 'default';
20 
24  public function __construct(array $converters)
25  {
26  $this->converters = $converters;
27  }
28 
35  public function getConverter($linkType)
36  {
37  return isset($this->converters[$linkType])
38  ? $this->converters[$linkType]
39  : $this->converters[$this->defaultConverterCode];
40  }
41 }