| Server IP : 85.158.181.41 / Your IP : 216.73.217.12 Web Server : Apache System : Linux cloud9-vm129 6.1.178+1-ph #ph SMP PREEMPT_DYNAMIC Wed Jul 29 09:00:54 UTC 2026 x86_64 User : moncbefd ( 1024) PHP Version : 7.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/moncbefd/www.moneta.at/vendor/gambio-hub/hubpublic/src/ValueObjects/ |
Upload File : |
<?php
namespace HubPublic\ValueObjects;
use HubPublic\Collections\CartItemCollection;
use HubPublic\Collections\CartTotalItemCollection;
/**
* Class CartContent
*
* @package HubPublic\ValueObjects
*/
class CartContent
{
/**
* Collection of cart items
*
* @var \HubPublic\Collections\CartItemCollection
*/
private $cartItems;
/**
* Collection of auxiliary cart items
*
* @var CartTotalItemCollection
*/
private $cartTotalItems;
/**
* Total price
*
* @var float
*/
private $totalPrice;
/**
* Shipping cost
*
* @var float
*/
private $shippingCost;
/**
* CartContent constructor.
*
* @param \HubPublic\Collections\CartItemCollection $cartItems Collection of cart items
* @param float $totalPrice Total price of all items in cart
* @param float $shippingCost
* @param CartTotalItemCollection $cartTotalItems
*/
public function __construct(CartItemCollection $cartItems, $totalPrice, $shippingCost, CartTotalItemCollection $cartTotalItems)
{
$this->cartItems = $cartItems;
$this->totalPrice = $totalPrice;
$this->shippingCost = $shippingCost;
$this->cartTotalItems = $cartTotalItems;
}
/**
* Returns a collection of all items in cart.
*
* @return \HubPublic\Collections\CartItemCollection Cart item collection
*/
public function getCartItemCollection()
{
return $this->cartItems;
}
/**
* Returns the total price of all items in cart.
*
* @return float Total price
*/
public function getTotalPrice()
{
return $this->totalPrice;
}
/**
* @return CartTotalItemCollection
*/
public function getCartTotalItemCollection()
{
return $this->cartTotalItems;
}
/**
* @return float
*/
public function getShippingCost()
{
return $this->shippingCost;
}
}