6Main\Localization\Loc::loadMessages(__FILE__);
58 private static $registryMap = [];
59 private static $registryObjects = [];
61 private static $initData = [
145 private static function initRegistry()
147 self::$registryMap = self::$initData;
149 $event =
new Main\Event(
'sale', self::EVENT_ON_INIT_REGISTRY_LIST);
151 $resultList = $event->getResults();
153 if (is_array($resultList) && !empty($resultList))
155 foreach ($resultList as $eventResult)
158 if ($eventResult->getType() === Main\EventResult::SUCCESS)
160 $params = $eventResult->getParameters();
161 if (!empty($params) && is_array($params))
163 self::$registryMap = array_merge(self::$registryMap, $params);
185 if (!self::$registryMap)
187 self::initRegistry();
190 if (!isset(self::$registryObjects[$type]))
192 if (isset(self::$registryMap[$type]))
194 self::$registryObjects[$type] =
new static($type);
202 return self::$registryObjects[$type];
212 if (!self::$registryMap)
214 self::initRegistry();
217 self::$registryMap[$code] = $registryItem;
224 private function __construct($type)
233 public function set($code, $className)
235 self::$registryMap[$this->type][$code] = $className;
243 public function get($code)
245 if (isset(self::$registryMap[$this->type][$code]))
247 return self::$registryMap[$this->type][$code];
252 'SALE_REGISTRY_CODE_VALUE_NO_EXISTS',
253 [
'#TYPE#' => $this->
getType(),
'#CODE#' => $code]
static getMessage($code, $replace=null, $language=null)
getOrderHistoryClassName()
const ENTITY_BASKET_PROPERTIES_COLLECTION
getOrderDiscountClassName()
const ENTITY_BASKET_PROPERTY_ITEM
const ENTITY_SHIPMENT_COLLECTION
const ENTITY_SHIPMENT_ITEM
const ENTITY_PAYABLE_BASKET_ITEM
const ENTITY_TRADE_BINDING_COLLECTION
getBasketPropertiesCollectionClassName()
const ENTITY_PROPERTY_VALUE
const ENTITY_BUNDLE_COLLECTION
const ENTITY_BASKET_RESERVE_COLLECTION
const ENTITY_PAYMENT_COLLECTION
static getInstance($type)
const ENTITY_SHIPMENT_PROPERTY_VALUE
const ENTITY_SHIPMENT_PROPERTY
getPropertyValueCollectionClassName()
getShipmentPropertyClassName()
const ENTITY_PROPERTY_VALUE_COLLECTION
const REGISTRY_TYPE_ARCHIVE_ORDER
const ENTITY_ORDER_DISCOUNT
getPayableItemCollectionClassName()
const ENTITY_DISCOUNT_COUPON
const ENTITY_SHIPMENT_ITEM_COLLECTION
getBundleCollectionClassName()
getShipmentCollectionClassName()
const ENTITY_ENTITY_MARKER
getShipmentPropertyValueClassName()
const ENTITY_PAYABLE_SHIPMENT
getReserveCollectionClassName()
static setRegistry($code, $registryItem)
getShipmentItemStoreCollectionClassName()
const ENTITY_SHIPMENT_PROPERTY_VALUE_COLLECTION
getOrderStatusClassName()
getShipmentItemClassName()
getShipmentPropertyValueCollectionClassName()
getEntityMarkerClassName()
getBasketPropertyItemClassName()
getPaymentCollectionClassName()
getDeliveryStatusClassName()
const REGISTRY_TYPE_ORDER
getDiscountCouponClassName()
getShipmentItemCollectionClassName()
const ENTITY_TRADE_BINDING_ENTITY
const ENTITY_SHIPMENT_ITEM_STORE_COLLECTION
getShipmentItemStoreClassName()
const ENTITY_ORDER_STATUS
getPropertyValueClassName()
const ENTITY_DELIVERY_STATUS
const ENTITY_ORDER_HISTORY
const ENTITY_SHIPMENT_ITEM_STORE
getReservedItemClassName()
const ENTITY_BASKET_RESERVE_COLLECTION_ITEM
const ENTITY_PAYABLE_ITEM_COLLECTION
const EVENT_ON_INIT_REGISTRY_LIST