@@ -42,28 +42,28 @@ discard block |
||
42 | 42 | public function register(BaseApplication $app) |
43 | 43 | { |
44 | 44 | // Service |
45 | - $app['eccube.service.system'] = $app->share(function () use ($app) { |
|
45 | + $app['eccube.service.system'] = $app->share(function() use ($app) { |
|
46 | 46 | return new \Eccube\Service\SystemService($app); |
47 | 47 | }); |
48 | - $app['view'] = $app->share(function () use ($app) { |
|
48 | + $app['view'] = $app->share(function() use ($app) { |
|
49 | 49 | return $app['twig']; |
50 | 50 | }); |
51 | - $app['eccube.service.cart'] = $app->share(function () use ($app) { |
|
51 | + $app['eccube.service.cart'] = $app->share(function() use ($app) { |
|
52 | 52 | return new \Eccube\Service\CartService($app); |
53 | 53 | }); |
54 | - $app['eccube.service.order'] = $app->share(function () use ($app) { |
|
54 | + $app['eccube.service.order'] = $app->share(function() use ($app) { |
|
55 | 55 | return new \Eccube\Service\OrderService($app); |
56 | 56 | }); |
57 | - $app['eccube.service.tax_rule'] = $app->share(function () use ($app) { |
|
57 | + $app['eccube.service.tax_rule'] = $app->share(function() use ($app) { |
|
58 | 58 | return new \Eccube\Service\TaxRuleService($app['eccube.repository.tax_rule']); |
59 | 59 | }); |
60 | - $app['eccube.service.plugin'] = $app->share(function () use ($app) { |
|
60 | + $app['eccube.service.plugin'] = $app->share(function() use ($app) { |
|
61 | 61 | return new \Eccube\Service\PluginService($app); |
62 | 62 | }); |
63 | - $app['eccube.service.mail'] = $app->share(function () use ($app) { |
|
63 | + $app['eccube.service.mail'] = $app->share(function() use ($app) { |
|
64 | 64 | return new \Eccube\Service\MailService($app); |
65 | 65 | }); |
66 | - $app['eccube.service.csv.export'] = $app->share(function () use ($app) { |
|
66 | + $app['eccube.service.csv.export'] = $app->share(function() use ($app) { |
|
67 | 67 | $csvService = new \Eccube\Service\CsvExportService(); |
68 | 68 | $csvService->setEntityManager($app['orm.em']); |
69 | 69 | $csvService->setConfig($app['config']); |
@@ -75,183 +75,183 @@ discard block |
||
75 | 75 | |
76 | 76 | return $csvService; |
77 | 77 | }); |
78 | - $app['eccube.service.shopping'] = $app->share(function () use ($app) { |
|
78 | + $app['eccube.service.shopping'] = $app->share(function() use ($app) { |
|
79 | 79 | return new \Eccube\Service\ShoppingService($app, $app['eccube.service.cart'], $app['eccube.service.order']); |
80 | 80 | }); |
81 | 81 | |
82 | 82 | // Repository |
83 | - $app['eccube.repository.master.authority'] = $app->share(function () use ($app) { |
|
83 | + $app['eccube.repository.master.authority'] = $app->share(function() use ($app) { |
|
84 | 84 | return $app['orm.em']->getRepository('Eccube\Entity\Master\Authority'); |
85 | 85 | }); |
86 | - $app['eccube.repository.master.tag'] = $app->share(function () use ($app) { |
|
86 | + $app['eccube.repository.master.tag'] = $app->share(function() use ($app) { |
|
87 | 87 | return $app['orm.em']->getRepository('Eccube\Entity\Master\Tag'); |
88 | 88 | }); |
89 | - $app['eccube.repository.master.pref'] = $app->share(function () use ($app) { |
|
89 | + $app['eccube.repository.master.pref'] = $app->share(function() use ($app) { |
|
90 | 90 | return $app['orm.em']->getRepository('Eccube\Entity\Master\Pref'); |
91 | 91 | }); |
92 | - $app['eccube.repository.master.sex'] = $app->share(function () use ($app) { |
|
92 | + $app['eccube.repository.master.sex'] = $app->share(function() use ($app) { |
|
93 | 93 | return $app['orm.em']->getRepository('Eccube\Entity\Master\Sex'); |
94 | 94 | }); |
95 | - $app['eccube.repository.master.disp'] = $app->share(function () use ($app) { |
|
95 | + $app['eccube.repository.master.disp'] = $app->share(function() use ($app) { |
|
96 | 96 | return $app['orm.em']->getRepository('Eccube\Entity\Master\Disp'); |
97 | 97 | }); |
98 | - $app['eccube.repository.master.product_type'] = $app->share(function () use ($app) { |
|
98 | + $app['eccube.repository.master.product_type'] = $app->share(function() use ($app) { |
|
99 | 99 | return $app['orm.em']->getRepository('Eccube\Entity\Master\ProductType'); |
100 | 100 | }); |
101 | - $app['eccube.repository.master.page_max'] = $app->share(function () use ($app) { |
|
101 | + $app['eccube.repository.master.page_max'] = $app->share(function() use ($app) { |
|
102 | 102 | return $app['orm.em']->getRepository('Eccube\Entity\Master\PageMax'); |
103 | 103 | }); |
104 | - $app['eccube.repository.master.order_status'] = $app->share(function () use ($app) { |
|
104 | + $app['eccube.repository.master.order_status'] = $app->share(function() use ($app) { |
|
105 | 105 | return $app['orm.em']->getRepository('Eccube\Entity\Master\OrderStatus'); |
106 | 106 | }); |
107 | - $app['eccube.repository.master.device_type'] = $app->share(function () use ($app) { |
|
107 | + $app['eccube.repository.master.device_type'] = $app->share(function() use ($app) { |
|
108 | 108 | return $app['orm.em']->getRepository('Eccube\Entity\Master\DeviceType'); |
109 | 109 | }); |
110 | - $app['eccube.repository.master.csv_type'] = $app->share(function () use ($app) { |
|
110 | + $app['eccube.repository.master.csv_type'] = $app->share(function() use ($app) { |
|
111 | 111 | return $app['orm.em']->getRepository('Eccube\Entity\Master\CsvType'); |
112 | 112 | }); |
113 | 113 | |
114 | - $app['eccube.repository.delivery'] = $app->share(function () use ($app) { |
|
114 | + $app['eccube.repository.delivery'] = $app->share(function() use ($app) { |
|
115 | 115 | return $app['orm.em']->getRepository('Eccube\Entity\Delivery'); |
116 | 116 | }); |
117 | - $app['eccube.repository.delivery_date'] = $app->share(function () use ($app) { |
|
117 | + $app['eccube.repository.delivery_date'] = $app->share(function() use ($app) { |
|
118 | 118 | return $app['orm.em']->getRepository('Eccube\Entity\DeliveryDate'); |
119 | 119 | }); |
120 | - $app['eccube.repository.delivery_fee'] = $app->share(function () use ($app) { |
|
120 | + $app['eccube.repository.delivery_fee'] = $app->share(function() use ($app) { |
|
121 | 121 | return $app['orm.em']->getRepository('Eccube\Entity\DeliveryFee'); |
122 | 122 | }); |
123 | - $app['eccube.repository.delivery_time'] = $app->share(function () use ($app) { |
|
123 | + $app['eccube.repository.delivery_time'] = $app->share(function() use ($app) { |
|
124 | 124 | return $app['orm.em']->getRepository('Eccube\Entity\DeliveryTime'); |
125 | 125 | }); |
126 | - $app['eccube.repository.payment'] = $app->share(function () use ($app) { |
|
126 | + $app['eccube.repository.payment'] = $app->share(function() use ($app) { |
|
127 | 127 | return $app['orm.em']->getRepository('Eccube\Entity\Payment'); |
128 | 128 | }); |
129 | - $app['eccube.repository.payment_option'] = $app->share(function () use ($app) { |
|
129 | + $app['eccube.repository.payment_option'] = $app->share(function() use ($app) { |
|
130 | 130 | return $app['orm.em']->getRepository('Eccube\Entity\PaymentOption'); |
131 | 131 | }); |
132 | - $app['eccube.repository.category'] = $app->share(function () use ($app) { |
|
132 | + $app['eccube.repository.category'] = $app->share(function() use ($app) { |
|
133 | 133 | $CategoryRepository = $app['orm.em']->getRepository('Eccube\Entity\Category'); |
134 | 134 | $CategoryRepository->setApplication($app); |
135 | 135 | |
136 | 136 | return $CategoryRepository; |
137 | 137 | }); |
138 | - $app['eccube.repository.customer'] = $app->share(function () use ($app) { |
|
138 | + $app['eccube.repository.customer'] = $app->share(function() use ($app) { |
|
139 | 139 | return $app['orm.em']->getRepository('Eccube\Entity\Customer'); |
140 | 140 | }); |
141 | - $app['eccube.repository.news'] = $app->share(function () use ($app) { |
|
141 | + $app['eccube.repository.news'] = $app->share(function() use ($app) { |
|
142 | 142 | return $app['orm.em']->getRepository('Eccube\Entity\News'); |
143 | 143 | }); |
144 | - $app['eccube.repository.mail_history'] = $app->share(function () use ($app) { |
|
144 | + $app['eccube.repository.mail_history'] = $app->share(function() use ($app) { |
|
145 | 145 | return $app['orm.em']->getRepository('Eccube\Entity\MailHistory'); |
146 | 146 | }); |
147 | - $app['eccube.repository.member'] = $app->share(function () use ($app) { |
|
147 | + $app['eccube.repository.member'] = $app->share(function() use ($app) { |
|
148 | 148 | $memberRepository = $app['orm.em']->getRepository('Eccube\Entity\Member'); |
149 | 149 | $memberRepository->setEncoderFactorty($app['security.encoder_factory']); |
150 | 150 | return $memberRepository; |
151 | 151 | }); |
152 | - $app['eccube.repository.order'] = $app->share(function () use ($app) { |
|
152 | + $app['eccube.repository.order'] = $app->share(function() use ($app) { |
|
153 | 153 | return $app['orm.em']->getRepository('Eccube\Entity\Order'); |
154 | 154 | }); |
155 | - $app['eccube.repository.product'] = $app->share(function () use ($app) { |
|
155 | + $app['eccube.repository.product'] = $app->share(function() use ($app) { |
|
156 | 156 | $productRepository = $app['orm.em']->getRepository('Eccube\Entity\Product'); |
157 | 157 | return $productRepository; |
158 | 158 | }); |
159 | - $app['eccube.repository.product_image'] = $app->share(function () use ($app) { |
|
159 | + $app['eccube.repository.product_image'] = $app->share(function() use ($app) { |
|
160 | 160 | return $app['orm.em']->getRepository('Eccube\Entity\ProductImage'); |
161 | 161 | }); |
162 | - $app['eccube.repository.product_class'] = $app->share(function () use ($app) { |
|
162 | + $app['eccube.repository.product_class'] = $app->share(function() use ($app) { |
|
163 | 163 | return $app['orm.em']->getRepository('Eccube\Entity\ProductClass'); |
164 | 164 | }); |
165 | - $app['eccube.repository.product_stock'] = $app->share(function () use ($app) { |
|
165 | + $app['eccube.repository.product_stock'] = $app->share(function() use ($app) { |
|
166 | 166 | return $app['orm.em']->getRepository('Eccube\Entity\ProductStock'); |
167 | 167 | }); |
168 | - $app['eccube.repository.product_tag'] = $app->share(function () use ($app) { |
|
168 | + $app['eccube.repository.product_tag'] = $app->share(function() use ($app) { |
|
169 | 169 | return $app['orm.em']->getRepository('Eccube\Entity\ProductTag'); |
170 | 170 | }); |
171 | - $app['eccube.repository.class_name'] = $app->share(function () use ($app) { |
|
171 | + $app['eccube.repository.class_name'] = $app->share(function() use ($app) { |
|
172 | 172 | return $app['orm.em']->getRepository('Eccube\Entity\ClassName'); |
173 | 173 | }); |
174 | - $app['eccube.repository.class_category'] = $app->share(function () use ($app) { |
|
174 | + $app['eccube.repository.class_category'] = $app->share(function() use ($app) { |
|
175 | 175 | return $app['orm.em']->getRepository('Eccube\Entity\ClassCategory'); |
176 | 176 | }); |
177 | - $app['eccube.repository.customer_favorite_product'] = $app->share(function () use ($app) { |
|
177 | + $app['eccube.repository.customer_favorite_product'] = $app->share(function() use ($app) { |
|
178 | 178 | return $app['orm.em']->getRepository('Eccube\Entity\CustomerFavoriteProduct'); |
179 | 179 | }); |
180 | - $app['eccube.repository.base_info'] = $app->share(function () use ($app) { |
|
180 | + $app['eccube.repository.base_info'] = $app->share(function() use ($app) { |
|
181 | 181 | $BaseInfoRepository = $app['orm.em']->getRepository('Eccube\Entity\BaseInfo'); |
182 | 182 | $BaseInfoRepository->setApplication($app); |
183 | 183 | |
184 | 184 | return $BaseInfoRepository; |
185 | 185 | }); |
186 | - $app['eccube.repository.tax_rule'] = $app->share(function () use ($app) { |
|
186 | + $app['eccube.repository.tax_rule'] = $app->share(function() use ($app) { |
|
187 | 187 | $taxRuleRepository = $app['orm.em']->getRepository('Eccube\Entity\TaxRule'); |
188 | 188 | $taxRuleRepository->setApplication($app); |
189 | 189 | |
190 | 190 | return $taxRuleRepository; |
191 | 191 | }); |
192 | - $app['eccube.repository.page_layout'] = $app->share(function () use ($app) { |
|
192 | + $app['eccube.repository.page_layout'] = $app->share(function() use ($app) { |
|
193 | 193 | $pageLayoutRepository = $app['orm.em']->getRepository('Eccube\Entity\PageLayout'); |
194 | 194 | $pageLayoutRepository->setApplication($app); |
195 | 195 | |
196 | 196 | return $pageLayoutRepository; |
197 | 197 | }); |
198 | - $app['eccube.repository.block'] = $app->share(function () use ($app) { |
|
198 | + $app['eccube.repository.block'] = $app->share(function() use ($app) { |
|
199 | 199 | $blockRepository = $app['orm.em']->getRepository('Eccube\Entity\Block'); |
200 | 200 | $blockRepository->setApplication($app); |
201 | 201 | |
202 | 202 | return $blockRepository; |
203 | 203 | }); |
204 | - $app['eccube.repository.order'] = $app->share(function () use ($app) { |
|
204 | + $app['eccube.repository.order'] = $app->share(function() use ($app) { |
|
205 | 205 | $orderRepository = $app['orm.em']->getRepository('Eccube\Entity\Order'); |
206 | 206 | $orderRepository->setApplication($app); |
207 | 207 | |
208 | 208 | return $orderRepository; |
209 | 209 | }); |
210 | - $app['eccube.repository.customer_address'] = $app->share(function () use ($app) { |
|
210 | + $app['eccube.repository.customer_address'] = $app->share(function() use ($app) { |
|
211 | 211 | return $app['orm.em']->getRepository('Eccube\Entity\CustomerAddress'); |
212 | 212 | }); |
213 | - $app['eccube.repository.shipping'] = $app->share(function () use ($app) { |
|
213 | + $app['eccube.repository.shipping'] = $app->share(function() use ($app) { |
|
214 | 214 | return $app['orm.em']->getRepository('Eccube\Entity\Shipping'); |
215 | 215 | }); |
216 | - $app['eccube.repository.customer_status'] = $app->share(function () use ($app) { |
|
216 | + $app['eccube.repository.customer_status'] = $app->share(function() use ($app) { |
|
217 | 217 | return $app['orm.em']->getRepository('Eccube\Entity\Master\CustomerStatus'); |
218 | 218 | }); |
219 | - $app['eccube.repository.order_status'] = $app->share(function () use ($app) { |
|
219 | + $app['eccube.repository.order_status'] = $app->share(function() use ($app) { |
|
220 | 220 | return $app['orm.em']->getRepository('Eccube\Entity\Master\OrderStatus'); |
221 | 221 | }); |
222 | - $app['eccube.repository.mail_template'] = $app->share(function () use ($app) { |
|
222 | + $app['eccube.repository.mail_template'] = $app->share(function() use ($app) { |
|
223 | 223 | return $app['orm.em']->getRepository('Eccube\Entity\MailTemplate'); |
224 | 224 | }); |
225 | - $app['eccube.repository.csv'] = $app->share(function () use ($app) { |
|
225 | + $app['eccube.repository.csv'] = $app->share(function() use ($app) { |
|
226 | 226 | return $app['orm.em']->getRepository('Eccube\Entity\Csv'); |
227 | 227 | }); |
228 | - $app['eccube.repository.template'] = $app->share(function () use ($app) { |
|
228 | + $app['eccube.repository.template'] = $app->share(function() use ($app) { |
|
229 | 229 | return $app['orm.em']->getRepository('Eccube\Entity\Template'); |
230 | 230 | }); |
231 | - $app['eccube.repository.authority_role'] = $app->share(function () use ($app) { |
|
231 | + $app['eccube.repository.authority_role'] = $app->share(function() use ($app) { |
|
232 | 232 | return $app['orm.em']->getRepository('Eccube\Entity\AuthorityRole'); |
233 | 233 | }); |
234 | 234 | |
235 | - $app['paginator.default'] = $app->protect(function () { |
|
235 | + $app['paginator.default'] = $app->protect(function() { |
|
236 | 236 | return new \Knp\Component\Pager\Paginator(); |
237 | 237 | }); |
238 | 238 | |
239 | - $app['paginator'] = $app->protect(function () use ($app) { |
|
239 | + $app['paginator'] = $app->protect(function() use ($app) { |
|
240 | 240 | return new PaginatorAdapter($app['paginator.default']()); |
241 | 241 | }); |
242 | 242 | |
243 | - $app['eccube.repository.help'] = $app->share(function () use ($app) { |
|
243 | + $app['eccube.repository.help'] = $app->share(function() use ($app) { |
|
244 | 244 | return $app['orm.em']->getRepository('Eccube\Entity\Help'); |
245 | 245 | }); |
246 | - $app['eccube.repository.plugin'] = $app->share(function () use ($app) { |
|
246 | + $app['eccube.repository.plugin'] = $app->share(function() use ($app) { |
|
247 | 247 | return $app['orm.em']->getRepository('Eccube\Entity\Plugin'); |
248 | 248 | }); |
249 | - $app['eccube.repository.plugin_event_handler'] = $app->share(function () use ($app) { |
|
249 | + $app['eccube.repository.plugin_event_handler'] = $app->share(function() use ($app) { |
|
250 | 250 | return $app['orm.em']->getRepository('Eccube\Entity\PluginEventHandler'); |
251 | 251 | }); |
252 | 252 | // em |
253 | 253 | if (isset($app['orm.em'])) { |
254 | - $app['orm.em'] = $app->share($app->extend('orm.em', function (\Doctrine\ORM\EntityManager $em, \Silex\Application $app) { |
|
254 | + $app['orm.em'] = $app->share($app->extend('orm.em', function(\Doctrine\ORM\EntityManager $em, \Silex\Application $app) { |
|
255 | 255 | // tax_rule |
256 | 256 | $taxRuleRepository = $em->getRepository('Eccube\Entity\TaxRule'); |
257 | 257 | $taxRuleRepository->setApplication($app); |
@@ -278,13 +278,13 @@ discard block |
||
278 | 278 | } |
279 | 279 | |
280 | 280 | // Form\Type |
281 | - $app['form.type.extensions'] = $app->share($app->extend('form.type.extensions', function ($extensions) use ($app) { |
|
281 | + $app['form.type.extensions'] = $app->share($app->extend('form.type.extensions', function($extensions) use ($app) { |
|
282 | 282 | $extensions[] = new \Eccube\Form\Extension\HelpTypeExtension(); |
283 | 283 | $extensions[] = new \Eccube\Form\Extension\FreezeTypeExtension(); |
284 | 284 | |
285 | 285 | return $extensions; |
286 | 286 | })); |
287 | - $app['form.types'] = $app->share($app->extend('form.types', function ($types) use ($app) { |
|
287 | + $app['form.types'] = $app->share($app->extend('form.types', function($types) use ($app) { |
|
288 | 288 | $types[] = new \Eccube\Form\Type\NameType($app['config']); |
289 | 289 | $types[] = new \Eccube\Form\Type\KanaType($app['config']); |
290 | 290 | $types[] = new \Eccube\Form\Type\TelType($app['config']); |