/** * Returns an singleton instance of this class * @return */ public static function getInstance() { if (self::$instance == null) { self::$instance = new OrderDetailsMapper(); } return self::$instance; }
/** * Initializes DB mappers * * @param object $config * @param object $args * @return */ function __construct($config, $args) { $this->mapper = OrderDetailsMapper::getInstance(); $this->config = $config; $this->args = $args; $this->customerCartManager = CustomerCartManager::getInstance($this->config, $this->args); $this->itemManager = ItemManager::getInstance($this->config, $this->args); $this->bundleItemsManager = BundleItemsManager::getInstance($this->config, $this->args); }