/** * Constructor * * @param null $data */ public function __construct($data) { $this->setProduct(new SimpleProduct($data)); $this->cart_product_srl = $data->cart_product_srl; $this->cart_product_title = $data->cart_product_title; $this->cart_product_price = $data->cart_product_price; $this->quantity = $data->quantity ? $data->quantity : 1; parent::__construct(); }
/** * Constructor override - initialises default values when none given */ public function __construct($args = NULL) { parent::__construct($args); if (!isset($this->description)) { $this->description = ""; } if (!isset($this->short_description)) { $this->short_description = ""; } if (!isset($this->status)) { $this->status = "enabled"; } }
public function __construct($data = null) { if ($data) { if ($data instanceof Cart) { $this->cart = $data; $this->loadFromCart($data); parent::__construct(); return; } foreach (array('billing_address', 'shipping_address', 'shipping_method', 'payment_method') as $val) { if (!isset($orderData[$val])) { //throw new ShopException("Missing $val, can't continue."); } } } parent::__construct($data); }
public function __construct(&$db, $row) { parent::__construct($db, $row); }
/** * Constructor marks private properties (exposed by magic methods to read/write) * @param null $data */ public function __construct($data = NULL) { $this->setMeta('privates', array('name', 'description', 'max_uses', 'valid_from', 'valid_to', 'discount_type', 'discount_value', 'active')); return parent::__construct($data); }