コード例 #1
0
 public function createDataFromParameters(StatisticsParameterBag $parameters)
 {
     $institutionStatsDaily = new InstitutionStatisticsDaily();
     $institutionStatsDaily->setInstitutionId($parameters->get(StatisticParameters::INSTITUTION_ID));
     $institutionStatsDaily->setCategoryId($parameters->get(StatisticParameters::CATEGORY_ID));
     $institutionStatsDaily->setIpAddress($parameters->get(StatisticParameters::IP_ADDRESS));
     $institutionStatsDaily->setDate(new \DateTime());
     return $institutionStatsDaily;
 }
コード例 #2
0
 public function createDataFromParameters(StatisticsParameterBag $parameters)
 {
     $type = $parameters->get(StatisticParameters::TYPE);
     $data = null;
     if (StatisticTypes::ADVERTISEMENT != $type) {
         // not an advertisement statistics
         return null;
     }
     $data = new AdvertisementStatisticsDaily();
     $data->setAdvertisementId($parameters->get(StatisticParameters::ADVERTISEMENT_ID, 0));
     $data->setCategoryId($parameters->get(StatisticParameters::CATEGORY_ID, 0));
     $data->setDate(new \DateTime(\date('Y-m-d')));
     $data->setInstitutionId($parameters->get(StatisticParameters::INSTITUTION_ID));
     return $data;
 }
コード例 #3
0
 public function createDataFromParameters(StatisticsParameterBag $parameters)
 {
     $type = $parameters->get(StatisticParameters::TYPE);
     $data = null;
     if (StatisticTypes::SEARCH_RESULT_ITEM != $type) {
         return null;
     }
     $data = new SearchResultsItemStatisticsDaily();
     $data->setCategoryId($parameters->get(StatisticParameters::CATEGORY_ID, 0));
     $data->setDate(new \DateTime(\date('Y-m-d')));
     $data->setInstitutionId($parameters->get(StatisticParameters::INSTITUTION_ID));
     $data->setInstitutionMedicalCenterId($parameters->get(StatisticParameters::INSTITUTION_MEDICAL_CENTER_ID, 0));
     $data->setCityId($parameters->get(StatisticParameters::CITY_ID, 0));
     $data->setCountryId($parameters->get(StatisticParameters::COUNTRY_ID, 0));
     $data->setSpecializationId($parameters->get(StatisticParameters::SPECIALIZATION_ID, 0));
     $data->setSubSpecializationId($parameters->get(StatisticParameters::SUB_SPECIALIZATION_ID, 0));
     $data->setTreatmentId($parameters->get(StatisticParameters::TREATMENT_ID, 0));
     return $data;
 }