public function __construct(array $aParams) { parent::__construct($aParams); $this->model = new Readout(); $this->externalModel = new OpenWeatherMap(); switch ($aParams['range']) { case 'year': $this->internalData = $this->model->getMonthlyAggregate(365, "ASC"); $this->externalData = $this->externalModel->getMonthlyAggregate(365, "ASC"); break; default: $this->internalData = $this->model->getDayAggregate(30, "ASC"); $this->externalData = $this->externalModel->getDayAggregate(30, "ASC"); break; } }
public function __construct(array $aParams) { parent::__construct($aParams); $this->model = new \Model\Readout(); }
public function __construct(array $aParams) { parent::__construct($aParams); $this->model = new $this->modelName(); }