Beispiel #1
0
 public function getRefererId($referer)
 {
     if ($referer) {
         $url = parse_url($referer);
         $parts = explode(".", $url['host']);
         $domain_id = $this->getDomainId($parts[count($parts) - 2] . "." . $parts[count($parts) - 1]);
         return $this->refererRepository->findOrCreate(array('url' => $referer, 'host' => $url['host'], 'domain_id' => $domain_id), array('url'));
     }
 }
 public function getRefererId($referer)
 {
     if ($referer) {
         $url = parse_url($referer);
         $parts = explode(".", $url['host']);
         $domain = array_pop($parts);
         if (sizeof($parts) > 0) {
             $domain = array_pop($parts) . "." . $domain;
         }
         $domain_id = $this->getDomainId($domain);
         return $this->refererRepository->store($referer, $url['host'], $domain_id);
     }
 }
 public function getRefererId($referer)
 {
     if ($referer) {
         $url = parse_url($referer);
         $parts = explode(".", $url['host']);
         $domain = array_pop($parts);
         if (sizeof($parts) > 0) {
             $domain = array_pop($parts) . "." . $domain;
         }
         $domain_id = $this->getDomainId($domain);
         return $this->refererRepository->findOrCreate(array('url' => $referer, 'host' => $url['host'], 'domain_id' => $domain_id), array('url'));
     }
 }