11 private static $instance = array();
20 private function __construct($fUserId, $siteId)
22 $this->fUserId = $fUserId;
23 $this->siteId = $siteId;
26 private function __clone()
30 protected static function getHash($fUserId, $siteId)
32 return "{$fUserId}_{$siteId}";
37 return $this->fUserId;
57 $hash = static::getHash($fUserId, $siteId);
59 if (!isset(static::$instance[$hash]))
61 static::$instance[$hash] =
new static($fUserId, $siteId);
64 return static::$instance[$hash];
69 if (!isset($this->basket))
77 public function getOrderableBasket()
79 if (!isset($this->orderableBasket))
82 $basketClone = $this->
getBasket()->createClone();
83 $this->orderableBasket = $basketClone->getOrderableItems();