Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
PlaceOrderPool.php
Go to the documentation of this file.
1 <?php
6 declare(strict_types=1);
7 
9 
12 
19 {
23  private $services;
24 
29  public function __construct(
30  TMapFactory $tmapFactory,
31  array $services = []
32  ) {
33  $this->services = $tmapFactory->createSharedObjectsMap(
34  [
35  'array' => $services,
36  'type' => PlaceOrderInterface::class
37  ]
38  );
39  }
40 
47  public function get(string $paymentProviderCode)
48  {
49  if (!isset($this->services[$paymentProviderCode])) {
50  return null;
51  }
52 
53  return $this->services[$paymentProviderCode];
54  }
55 }
__construct(TMapFactory $tmapFactory, array $services=[])