Esempio n. 1
0
 public static function decide(MongoCollection $collJobs, MongoCollection $collCompanies)
 {
     $searchCityStates = ProcessSearch::processJobLocations();
     $searchIndustries = ProcessSearch::processJobIndustries();
     JobListings::init($collJobs);
     $jobCityStates = JobListings::processLocations();
     CompanyListings::init($collCompanies);
     $companyIndustries = CompanyListings::processIndustries();
     // Get demand of each searched city.
     $demandCities = self::getDemand($searchCityStates, $jobCityStates);
     $demandIndustries = self::getDemand($searchIndustries, $companyIndustries);
     $recommendationCities = self::getRecommendation($demandCities);
     $recommendationIndustries = self::getRecommendation($demandIndustries);
     return ['searchesCities' => $searchCityStates, 'jobsCities' => $jobCityStates, 'searchesIndustries' => $searchIndustries, 'companyIndustries' => $companyIndustries, 'demandCities' => $demandCities, 'demandIndustries' => $demandIndustries, 'recommendationCities' => $recommendationCities, 'recommendationIndustries' => $recommendationIndustries];
 }
Esempio n. 2
0
 public static function init(MongoCollection $coll)
 {
     self::$coll = $coll;
 }