Ejemplo n.º 1
0
 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;
     }
 }
Ejemplo n.º 2
0
 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();
 }