public function init() { parent::init(); $this->helper = new \WikiGetDataForVisualizationHelper(); $this->model = new \CityVisualization(); $this->corporatePageIds = $this->model->getVisualizationWikisIds(); }
/** * @param $params array of options * * Valid options are: * noChangeThreshold (int) -> how many days of non-changed stat cause an error */ public function __construct($params) { $this->baseDate = date(self::DATE_FORMAT); if (!empty($params['noChangeThreshold'])) { $this->noChangeThreshold = intval($params['noChangeThreshold']); } else { $this->noChangeThreshold = self::DEFAULT_NO_CHANGE_THRESHOLD; } if (!empty($params['watcherEmails'])) { $this->watcherEmails = explode(',', $params['watcherEmails']); } else { // if no emails are passed, we don't send anything $this->watcherEmails = []; } $this->dataStorage = new CorporateHomePageStatisticsStorage(); $cityVisualization = new CityVisualization(); $this->corporateWikis = $cityVisualization->getVisualizationWikisIds(); $this->collectedErrors = []; }