public function quick() { $keyword = $this->Request->get->keyword; $jBom = new JobsBom(); $template = new Core_Template("default", "search", "results"); $template->setAttribute("results", $jBom->getAllJobsByQuickSearch($keyword)); $template->setAttribute("keyword", $keyword); }
public function info($param) { $cBom = new CompaniesBom(); $jBom = new JobsBom(); $company = $cBom->getCompanyByCompanyName($param); $template = new Core_Template("default", "companies", "info"); $template->setAttribute("company", $company); $template->setAttribute("latest_jobs", $jBom->getJobsByCompanyName($company->name)); }
public function view($job_id) { $jBom = new JobsBom(); $apis = new APISources(); $template = new Core_Template("default", "jobs", "view"); $job = $jBom->getJobByJobId($job_id); $template->setAttribute("job", $job); $template->setAttribute("other_jobs", $jBom->getJobsByCompanyName($job->company)); $template->setAttribute("api", $apis->retrieveObjectById($job->api_source_id)); }
public function index() { $jBom = new JobsBom(); $cBom = new CompaniesBom(); $template = new Core_Template("default", "default"); $template->setAttribute("records", $jBom->getAllRecentJobs()); $template->setAttribute("companies", $cBom->getRecentActiveCompanies()); $template->setAttribute("trending_jobs", $jBom->getTrendingJobs()); $template->setAttribute("featured_company", $cBom->getFeaturedCompany()); }
public function advance() { $page = isset($this->Request->get->page) ? $this->Request->get->page : 1; $jBom = new JobsBom(); $Response = $jBom->getAllJobsByAdvanceSearch($this->Request->get, $page); $template = new Core_Template("default", "search", "advanceResults"); $template->setAttribute("results", $Response->data); $template->setAttribute("pages", $Response->pages); $template->setAttribute("current_page", $Response->current_page); $template->setAttribute("criteria", $this->Request->get); }
public function callController() { if (Configuration::isSiteOffline()) { new Core_Template("clean", "error", "siteMaintenance"); return; } // Check first if the controller exists in the controllers if (!class_exists($this->controller)) { $template = new Core_Template("default", "error", "pageNotFound"); $template->setAttribute("page", $this->module); return; } // Checks if the method doesnt exists in the controller if (!method_exists($this->controller, $this->method)) { $template = new Core_Template("default", "error", "pageNotFound"); $template->setAttribute("page", $this->method); return; } $dispatch = new $this->controller(); if ((int) method_exists($this->controller, $this->method)) { call_user_func_array(array($dispatch, $this->method), $this->queryString); } }