1 | <?php |
||
24 | final class DefaultChannelFactory implements DefaultChannelFactoryInterface |
||
25 | { |
||
26 | const DEFAULT_CHANNEL_NAME = 'Default'; |
||
27 | const DEFAULT_CHANNEL_CODE = 'DEFAULT'; |
||
28 | const DEFAULT_CHANNEL_CURRENCY = 'USD'; |
||
29 | |||
30 | /** |
||
31 | * @var ChannelFactoryInterface |
||
32 | */ |
||
33 | private $channelFactory; |
||
34 | |||
35 | /** |
||
36 | * @var FactoryInterface |
||
37 | */ |
||
38 | private $currencyFactory; |
||
39 | |||
40 | /** |
||
41 | * @var FactoryInterface |
||
42 | */ |
||
43 | private $localeFactory; |
||
44 | |||
45 | /** |
||
46 | * @var RepositoryInterface |
||
47 | */ |
||
48 | private $channelRepository; |
||
49 | |||
50 | /** |
||
51 | * @var RepositoryInterface |
||
52 | */ |
||
53 | private $currencyRepository; |
||
54 | |||
55 | /** |
||
56 | * @var RepositoryInterface |
||
57 | */ |
||
58 | private $localeRepository; |
||
59 | |||
60 | /** |
||
61 | * @var string |
||
62 | */ |
||
63 | private $defaultLocaleCode; |
||
64 | |||
65 | /** |
||
66 | * @param ChannelFactoryInterface $channelFactory |
||
67 | * @param FactoryInterface $currencyFactory |
||
68 | * @param FactoryInterface $localeFactory |
||
69 | * @param RepositoryInterface $channelRepository |
||
70 | * @param RepositoryInterface $currencyRepository |
||
71 | * @param RepositoryInterface $localeRepository |
||
72 | * @param string $defaultLocaleCode |
||
73 | */ |
||
74 | public function __construct( |
||
91 | |||
92 | /** |
||
93 | * {@inheritdoc} |
||
94 | */ |
||
95 | public function create($code = null, $name = null, $currencyCode = null) |
||
119 | |||
120 | /** |
||
121 | * @param string|null $currencyCode |
||
122 | * |
||
123 | * @return CurrencyInterface |
||
124 | */ |
||
125 | private function provideCurrency($currencyCode = null) |
||
141 | |||
142 | /** |
||
143 | * @return LocaleInterface |
||
144 | */ |
||
145 | private function provideLocale() |
||
159 | } |
||
160 |