Store the referer's search terms.

@param  \Arcanedev\LaravelTracker\Contracts\Models\Referer  $referer
@param  string                                              $searchTerms
174343
private function trackRefererSearchTerms($referer, $searchTerms)
    {
        $terms = [];

        foreach (explode(' ', $searchTerms) as $term) {
            $terms[] = $this->makeModel(BindingManager::MODEL_REFERER_SEARCH_TERM)->fill([
                'search_term' => $term,
            ]);
        }

        if (count($terms) > 0)
            $referer->searchTerms()->saveMany($terms);

    }
774254
public function indexAction($searchTerm = '')
    {
        $assets = $this->assetRepository->findBySearchTermOrTags(
            $searchTerm,
            $this->tagRepository->findBySearchTerm($searchTerm)->toArray()
        );

        $this->view->assign('assets', $assets);
    }
872122
private function persistWurflInfo(VersionIterator $wurflInfoIterator)
    {
        foreach ($wurflInfoIterator as $info) {
            $this->persistenceProvider->save(Info::PERSISTENCE_KEY, $info);

            return;
        }
    }
601520
public function setSearchParams($searchParams)
    {
        // hack to work with $searchParams when it's an Object
        if ($searchParams instanceof HTTPRequest) {
            $this->searchParams = $searchParams->getVars();
        } else {
            $this->searchParams = $searchParams;
        }
        return $this;
    }
611056
public function getByReferral($referralCode)
    {
        if (!is_string($referralCode)) {
            return false;
        }

        $data = [
            'where' => [
                [
                    'column' => $this->tableAlias . '.referral',
                    'value'  => $referralCode,
                ],
            ],
        ];

        $user = $this->getAll(null, null, $data);

        return empty($user) ? false : $user[0];
    }
274624
def handle_special_fields
      if ['referer_host', 'referer_path', 'referer_params', 'search_engine', 'search_query'].include?(params[:field])
        @items = @items.only_first_in_session
      end
      
      if ['search_engine', 'search_query'].include?(params[:field])
        @items = @items.without_nil_in params[:field]
      end
      
      if params[:field] == 'entry_path'
        params[:field] = 'path'
        @items = @items.only_first_in_session
      end
      
      super
    end
260462
protected void redirectToReferrer() {
        String referrer = context.requestHeader("Referer");
        referrer = referrer == null? context.contextPath()/*injector.getInstance(DeploymentInfo.class).getContextPath()*/ : referrer;
        redirect(referrer);
    }
1253518
protected function getTranslationRoute($referrer, $oldLocale, $locale)
    {
        /** @var $languageSwitcherHelper LanguageSwitcherHelper */
        $languageSwitcherHelper = $this->get('networking_init_cms.page.helper.language_switcher');

        $oldURL = $languageSwitcherHelper->getPathInfo($referrer);

        return $languageSwitcherHelper->getTranslationRoute($oldURL, $oldLocale, $locale);
    }
588167
public function parse($refererUrl, $pageUrl)
    {
        $this->setReferer($this->parser->parse($refererUrl, $pageUrl));

        return $this;
    }
1131381
public function Search($SearchModel) {
		$SearchModel->AddSearch($this->DiscussionSql($SearchModel));
		$SearchModel->AddSearch($this->CommentSql($SearchModel));
	}
329646
public function getReferers( $skip )
	{
		$referers		= array();
		foreach( $this->data as $entry )
		{
			if( $entry['remote_addr'] != $this->skip )
			{
				if( $entry['referer_uri'] && !preg_match( "#.*".$skip.".*#si", $entry['referer_uri'] ) )
				{
					if( isset( $referers[$entry['referer_uri']] ) )
						$referers[$entry['referer_uri']] ++;
					else
						$referers[$entry['referer_uri']]	= 1;
				}
			}
		}
		arsort( $referers );
		foreach( $referers as $referer => $count )
			$lines[]	= "<tr><td>".$referer."</td><td>".$count."</td></tr>";
		$lines	= implode( "\n\t", $lines );
		$content	= "<table>".$lines."</table>";
		return $content;
	}
446807
public function getList(SearchCriteriaInterface $searchCriteria)
    {
        /** @var \Limesharp\Stockists\Api\Data\StockistSearchResultsInterface $searchResults */
        $searchResults = $this->searchResultsFactory->create();
        $searchResults->setSearchCriteria($searchCriteria);

        /** @var \Limesharp\Stockists\Model\ResourceModel\Stores\Collection $collection */
        $collection = $this->stockistCollectionFactory->create();

        //Add filters from root filter group to the collection
        /** @var FilterGroup $group */
        foreach ($searchCriteria->getFilterGroups() as $group) {
            $this->addFilterGroupToCollection($group, $collection);
        }
        $sortOrders = $searchCriteria->getSortOrders();
        /** @var SortOrder $sortOrder */
        if ($sortOrders) {
            foreach ($searchCriteria->getSortOrders() as $sortOrder) {
                $field = $sortOrder->getField();
                $collection->addOrder(
                    $field,
                    ($sortOrder->getDirection() == SortOrder::SORT_ASC) ? 'ASC' : 'DESC'
                );
            }
        } else {
            // set a default sorting order since this method is used constantly in many
            // different blocks
            $field = 'stockist_id';
            $collection->addOrder($field, 'ASC');
        }
        $collection->setCurPage($searchCriteria->getCurrentPage());
        $collection->setPageSize($searchCriteria->getPageSize());

        /** @var \Limesharp\Stockists\Api\Data\StockistInterface[] $stockists */
        $stockists = [];
        /** @var \Limesharp\Stockists\Model\Stores $stockist */
        foreach ($collection as $stockist) {
            /** @var \Limesharp\Stockists\Api\Data\StockistInterface $stockistDataObject */
            $stockistDataObject = $this->stockistInterfaceFactory->create();
            $this->dataObjectHelper->populateWithArray($stockistDataObject, $stockist->getData(), StockistInterface::class);
            $stockists[] = $stockistDataObject;
        }
        $searchResults->setTotalCount($collection->getSize());
        return $searchResults->setItems($stockists);
    }
1092995
public function getSeriesLookup($searchTerm)
    {
        $uri = 'series/lookup';
        $uriData = [
            'term' => $searchTerm
        ];

        $response = [
            'uri' => $uri,
            'type' => 'get',
            'data' => $uriData
        ];

        return $this->processRequest($response);
    }
1140274
public static function check_referer()
    {
        $uri     = parse_url($_SERVER['REQUEST_URI']);
        $referer = parse_url(self::request_header('Referer'));

        return $referer['host'] == self::request_header('Host') && $referer['path'] == $uri['path'];
    }
1100838
public function createReferrerCollection($document)
    {
        $node = $this->registry->getNodeForDocument($document);
        $locale = $this->registry->getOriginalLocaleForDocument($document);

        return new ReferrerCollection(
            $node,
            $this->dispatcher,
            $locale
        );
    }
179662
public Request referer(String refererValue){
        final String referer = RequestHeaderFields.REFERER.getName();
        return this.setHeader(referer, refererValue);
    }
35308
private function persistWurflInfo($wurflInfoIterator)
    {
        foreach ($wurflInfoIterator as $info) {
            $this->persistenceProvider->save(WURFL_Xml_Info::PERSISTENCE_KEY, $info);
            return;
        }
    }