Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
PriceFactory.php
1<?php
2
4
6
16{
17 public const SIMPLE_PRICE = SimplePrice::class;
18 public const QUANTITY_DEPENDENT_PRICE = QuantityDependentPrice::class;
19 public const PRICE_COLLECTION = PriceCollection::class;
20
21 protected $container;
22
29 {
30 $this->container = $container;
31 }
32
36 public function createEntity(): BasePrice
37 {
38 // $price = $this->container->make(self::QUANTITY_DEPENDENT_PRICE);
39 return $this->container->make(self::SIMPLE_PRICE);
40 }
41
46 {
47 return $this->container->make(self::PRICE_COLLECTION);
48 }
49}
__construct(ContainerContract $container)