/** * @return AbstractStatisticQuery * @throws Exception */ public function getQuery() { switch ($this->statisic_type) { case StatisticController::STATISTIC_AS: return AsCountStatistic::find()->with(AsCountStatistic::R_AS_LIST); case StatisticController::STATISTIC_A: return ACountStatistic::find()->with(ACountStatistic::R_AS_LIST); case StatisticController::STATISTIC_CNAME: return CnameCountStatistic::find(); case StatisticController::STATISTIC_DOMAIN: return DomainCountStatistic::find(); case StatisticController::STATISTIC_MX: return MxCountStatistic::find(); case StatisticController::STATISTIC_NS: return NsCountStatistic::find(); case StatisticController::STATISTIC_REGISTRANT: return RegistrantCountStatistic::find(); case StatisticController::STATISTIC_REGRU: return RegruStatData::find()->with(RegruStatData::R_REGRU_PROVIDERS); } throw new Exception('Not found correct type'); }