protected function setItems($cartItems)
    {
        foreach ($cartItems as $cartItem) {
            $this->items->push(CartItem::createFrom($cartItem));
        }
    }
protected function setItems($cartItems)
    {
        foreach ($cartItems as $cartItem) {
            $this->items->push(CartItem::createFrom($cartItem));
        }
    }
protected function setItems ( $ cartItems ) { foreach ( $ cartItems as $ cartItem ) { $ this -> items -> push ( CartItem :: createFrom ( $ cartItem ) ) ; } }
Creates CartItem objects from the data.

@param array Cart items data
@return void
Creates CartItem objects from the data .