function __construct(Agent $model = null, Database $db = null) { parent::__construct(); $this->agent = $model; $this->db = $db; if ($this->db == null) { $this->db = new Database(); } }
function __construct(Flight $flight = null, Database $db = null) { parent::__construct(); $this->flight = $flight; if ($db == null) { $this->db = new Database(); } else { $this->db = $db; } }
public function __construct($flight_id = NULL, $ticket_cat = NULL, $ticket_type = NULL, $adult = 0, $child = 0, $price = 0.0) { parent::__construct(); $this->flight_id = $flight_id; $this->children_no = $child; $this->adult_no = $adult; $this->ticket_cat = $ticket_cat; $this->ticket_type = $ticket_type; $this->ticket_adult_price = $price; $this->id = Validator::UniqueKey(); }