Exemplo n.º 1
0
 /**
  * @param \app\models\product\Product $product
  * @param $count
  * @param Customer $customer
  */
 public function __construct(Product $product, $count, Customer $customer)
 {
     $this->product = $product;
     $this->count = $product->isCountable() ? $count : 1;
     $this->cost = $product->getCost() * $this->getCount();
     $this->customer = $customer;
 }