| 1 |
<?php |
| 2 |
/** |
| 3 |
* Class CompoundCarrierCollectionFactory |
| 4 |
* |
| 5 |
* @package Packetery |
| 6 |
*/ |
| 7 |
|
| 8 |
declare( strict_types=1 ); |
| 9 |
|
| 10 |
namespace Packetery\Core\PickupPointProvider; |
| 11 |
|
| 12 |
/** |
| 13 |
* Class CompoundCarrierCollectionFactory |
| 14 |
* |
| 15 |
* @package Packetery |
| 16 |
*/ |
| 17 |
class CompoundCarrierCollectionFactory { |
| 18 |
/** |
| 19 |
* Creates collection. |
| 20 |
* TODO: take into account that not all types of pickup points support age verification. |
| 21 |
* Can lead to situation with no pickup points available when age verification is required. |
| 22 |
* |
| 23 |
* @return CompoundProvider[] |
| 24 |
*/ |
| 25 |
public function create() { |
| 26 |
return [ |
| 27 |
// CZ Packeta pickup points. |
| 28 |
new CompoundProvider( |
| 29 |
'zpointcz', |
| 30 |
'cz', |
| 31 |
true, |
| 32 |
true, |
| 33 |
'CZK', |
| 34 |
true, |
| 35 |
[ |
| 36 |
'czzpoint', |
| 37 |
'czzbox', |
| 38 |
] |
| 39 |
), |
| 40 |
// SK Packeta pickup points. |
| 41 |
new CompoundProvider( |
| 42 |
'zpointsk', |
| 43 |
'sk', |
| 44 |
true, |
| 45 |
true, |
| 46 |
'EUR', |
| 47 |
true, |
| 48 |
[ |
| 49 |
'skzpoint', |
| 50 |
'skzbox', |
| 51 |
] |
| 52 |
), |
| 53 |
// HU Packeta pickup points. |
| 54 |
new CompoundProvider( |
| 55 |
'zpointhu', |
| 56 |
'hu', |
| 57 |
true, |
| 58 |
true, |
| 59 |
'HUF', |
| 60 |
true, |
| 61 |
[ |
| 62 |
'huzpoint', |
| 63 |
'huzbox', |
| 64 |
] |
| 65 |
), |
| 66 |
// RO Packeta pickup points. |
| 67 |
new CompoundProvider( |
| 68 |
'zpointro', |
| 69 |
'ro', |
| 70 |
true, |
| 71 |
true, |
| 72 |
'RON', |
| 73 |
true, |
| 74 |
[ |
| 75 |
'rozpoint', |
| 76 |
'rozbox', |
| 77 |
] |
| 78 |
), |
| 79 |
]; |
| 80 |
} |
| 81 |
} |
| 82 |
|