Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Composite.php
Go to the documentation of this file.
1 <?php
7 
10 
19 {
23  protected $list = [];
24 
28  public function __construct(array $list)
29  {
30  $this->list = $list;
31  }
32 
40  public function isApplicable(MethodInterface $paymentMethod, Quote $quote)
41  {
42  foreach ($this->list as $specification) {
43  if (!$specification->isApplicable($paymentMethod, $quote)) {
44  return false;
45  }
46  }
47  return true;
48  }
49 }
$quote
isApplicable(MethodInterface $paymentMethod, Quote $quote)
Definition: Composite.php:40