public function __construct($sc_id = null) { if ($sc_id) { if (StockCompany::isValid($sc_id)) { $this->sc_id = $sc_id; $this->getDetails(); $this->found = true; } else { $this->sc_id = $sc_id; } } }
public function __construct($sc_id = null) { if ($sc_id && StockCompany::isValid($sc_id)) { $this->sc_id = $sc_id; $this->cur_amt = $this->getCurPrice($this->sc_id); $this->getPriceChanges(); $this->threshold = StockCompany::getThreshold($this->sc_id) ? StockCompany::getThreshold($this->sc_id) : 0; $this->found = true; } else { $this->sc_id = $sc_id; } }