1 | <?php |
||
12 | class TargetDefinition implements TargetDefinitionInterface |
||
13 | { |
||
14 | /** |
||
15 | * @var Collection|ConditionInterface[] |
||
16 | */ |
||
17 | protected $conditions; |
||
18 | /** @var string */ |
||
19 | private $route; |
||
20 | |||
21 | /** |
||
22 | * TargetDefinition constructor. |
||
23 | * |
||
24 | * @param string $route |
||
25 | */ |
||
26 | 7 | public function __construct($route) |
|
31 | |||
32 | /** {@inheritdoc} */ |
||
33 | 7 | public function match(DestinationInterface $destination) |
|
58 | |||
59 | /** |
||
60 | * Get conditions indexed by code |
||
61 | * |
||
62 | * @return ConditionInterface[] |
||
63 | */ |
||
64 | public function getConditions() |
||
68 | |||
69 | /** {@inheritdoc} */ |
||
70 | public function setCondition($code, ConditionInterface $condition) |
||
78 | |||
79 | /** {@inheritdoc} */ |
||
80 | 1 | public function getCondition($code) |
|
88 | |||
89 | /** |
||
90 | * @param SourceInterface[] $sources |
||
91 | * |
||
92 | * @return int |
||
93 | */ |
||
94 | 1 | public function count(array $sources) |
|
109 | |||
110 | /** {@inheritdoc} */ |
||
111 | 11 | public function getRoute() |
|
115 | } |
||
116 |