/** * Merge * * @param \XLite\Model\Cart $cart Cart * * @return \XLite\Model\Cart */ public function merge(\XLite\Model\Cart $cart) { if (!$cart->isEmpty()) { foreach ($cart->getItems() as $item) { $cart->getItems()->removeElement($item); $item->setOrder($this); $this->addItems($item); } } $this->updateOrder(); }
/** * {@inheritDoc} */ public function isEmpty() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'isEmpty', array()); return parent::isEmpty(); }