db = $db; $this->config = $config; $this->criteriaValidationService = $criteriaValidationService; $this->collection = $collection; $this->collectionEntryClassName = $this->collection->getEntryClassName(); } /** * @return mixed */ public function getFromRequest() { $site = $this->findByAltPrimary(array('code' => filter_var($_GET['site'],FILTER_SANITIZE_SPECIAL_CHARS))); return $site; } /** * @return mixed */ public function getMainSiteIDFromRequest() { $inst = $this->getFromRequest(); return $inst->id; } }