Cart\Cart::__construct PHP Method

__construct() public method

Create a new cart instance.
public __construct ( string $id, Cart\Storage\Store $store )
$id string
$store Cart\Storage\Store
    public function __construct($id, Store $store)
    {
        $this->id = $id;
        $this->store = $store;
    }

Usage Example

コード例 #1
0
ファイル: CartWithShipping.php プロジェクト: rukzuk/rukzuk
 /**
  * @param string $id
  * @param Store  $store
  * @param float  $shippingCosts
  * @param float  $shippingTax
  */
 public function __construct($id, Store $store, $shippingCosts, $shippingTax)
 {
     $this->shippingCosts = $shippingCosts;
     $this->shippingTax = $shippingTax;
     parent::__construct($id, $store);
 }