Bristol SU Support Package
OrSpecification.php
Go to the documentation of this file.
1 <?php
2 
3 
5 
6 
8 
13 {
14 
20  private $specifications;
21 
25  public function __construct(...$specifications)
26  {
27  $this->specifications = $specifications;
28  }
29 
35  public function isSatisfied() : bool
36  {
37  if (count($this->specifications) === 0) {
38  return true;
39  }
40  foreach ($this->specifications as $specification) {
41  if ($specification->isSatisfied()) {
42  return true;
43  }
44  }
45 
46  return false;
47  }
48 
49 }