1 <?php
2 3 4
5 namespace Team3\PayU\Order\Transformer\UserOrder\Strategy;
6
7 use Team3\PayU\Order\Transformer\UserOrder\Strategy\Product\ProductCollectionTransformer;
8 use Team3\PayU\Order\Transformer\UserOrder\Strategy\Product\SingleProductTransformer;
9 use Team3\PayU\Order\Transformer\UserOrder\Strategy\ShippingMethod\ShippingMethodCollectionTransformer;
10 use Team3\PayU\Order\Transformer\UserOrder\Strategy\ShippingMethod\SingleShippingMethodTransformer;
11 use Team3\PayU\Order\Transformer\UserOrder\UserOrderTransformerInterface;
12 use Team3\PayU\PropertyExtractor\ExtractorInterface;
13
14 15 16 17 18
19 class UserOrderTransformerStrategiesProvider implements UserOrderTransformerStrategiesProviderInterface
20 {
21 22 23 24 25 26
27 public function getStrategies(
28 ExtractorInterface $extractor,
29 UserOrderTransformerInterface $userOrderTransformer
30 ) {
31 return [
32 new ProductCollectionTransformer(
33 new SingleProductTransformer($extractor)
34 ),
35 new ShippingMethodCollectionTransformer(
36 new SingleShippingMethodTransformer($extractor)
37 ),
38 new BuyerTransformer(),
39 new DeliveryTransformer(),
40 new GeneralTransformer(),
41 new InvoiceTransformer(),
42 new RecursiveTransformerStrategy($userOrderTransformer),
43 new UrlsTransformer(),
44 ];
45 }
46 }
47