1 | <?php |
||
16 | class InvoiceItemsStrategy implements StrategyInterface |
||
17 | { |
||
18 | /** @var HydratorInterface */ |
||
19 | private $hydrator; |
||
20 | |||
21 | /** |
||
22 | * InvoiceItemsStrategy constructor. |
||
23 | * |
||
24 | * @param HydratorInterface $hydrator |
||
25 | */ |
||
26 | 6 | public function __construct(HydratorInterface $hydrator) |
|
30 | |||
31 | /** |
||
32 | * Converts the given value so that it can be extracted by the hydrator. |
||
33 | * |
||
34 | * @param ContactInterface[] $value The original value. |
||
35 | * |
||
36 | * @return array Returns the value that should be extracted. |
||
37 | * @throws BadMethodCallException for a non-object $contactObj |
||
38 | */ |
||
39 | 2 | public function extract($value) :array |
|
50 | |||
51 | /** |
||
52 | * Converts the given value so that it can be hydrated by the hydrator. |
||
53 | * @param array $value |
||
54 | * |
||
55 | * @return ContactInterface[] |
||
56 | * @throws BadMethodCallException for a non-object $contactObj |
||
57 | */ |
||
58 | 2 | public function hydrate($value) :array |
|
70 | } |
||
71 |