Cart\Cart::__construct PHP Метод

__construct() публичный Метод

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
 /**
  * @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);
 }