Set visit.

@param \BlackForest\PiwikBundle\Entity\PiwikVisit|null $visit

@return PiwikVisitAction
507254
public function setVisit(\BlackForest\PiwikBundle\Entity\PiwikVisit $visit = null)
    {
        $this->visit = $visit;

        return $this;
    }
842833
public function visitor($visitorId = null)
  {
    if($visitorId === null)
    {
      $visitorId = $this->getVisitorIdCookie();
    }
    return Visitor::newInstance($this)
      ->setVisitorId($visitorId);
  }
45363
public final void visit(final Visitor visitor)
	{
		final Visit visit = new Visit();
		try
		{
			visit(visitor, visit);
		}
		catch (final StopVisitationException ignored)
		{
		}
	}
1309376
public function visit(Visitor $visitor, Generator $generator, $data)
    {
        $generator->startObjectElement('UrlAliasList');
        $visitor->setHeader('Content-Type', $generator->getMediaType('UrlAliasList'));

        $generator->startAttribute('href', $data->path);
        $generator->endAttribute('href');

        $generator->startList('UrlAlias');
        foreach ($data->urlAliases as $urlAlias) {
            $visitor->visitValueObject($urlAlias);
        }
        $generator->endList('UrlAlias');

        $generator->endObjectElement('UrlAliasList');
    }
827745
public function setVisitorType(\BlackForest\PiwikBundle\Entity\PiwikVisitorType $visitorType = null)
    {
        $this->visitorType = $visitorType;

        return $this;
    }
1022120
public static function getReferrerSummaryForVisit($visit)
    {
        $referrerType = $visit->getColumn('referrerType');
        if ($referrerType === false
            || $referrerType == 'direct'
        ) {
            return Piwik::translate('Referrers_DirectEntry');
        }

        if ($referrerType == 'search') {
            $referrerName = $visit->getColumn('referrerName');

            $keyword = $visit->getColumn('referrerKeyword');
            if ($keyword !== false
                && $keyword != APIReferrers::getKeywordNotDefinedString()
            ) {
                $referrerName .= ' (' . $keyword . ')';
            }
            return $referrerName;
        }

        if ($referrerType == 'campaign') {

            $summary = Piwik::translate('Referrers_ColumnCampaign') . ': ' . $visit->getColumn('referrerName');
            $keyword = $visit->getColumn('referrerKeyword');
            if (!empty($keyword)) {
                $summary .= ' - ' . $keyword;
            }

            return $summary;
        }

        return $visit->getColumn('referrerName');
    }
865156
public function setReferrerType(\BlackForest\PiwikBundle\Entity\PiwikReferrerType $referrerType = null)
    {
        $this->referrerType = $referrerType;

        return $this;
    }
44943
public function onExistingVisit(Request $request, Visitor $visitor, $action)
    {
        $idAction = $visitor->getVisitorColumn('visit_entry_idaction_url');

        if (is_null($idAction) && !empty($action)) {
            $idAction = $action->getIdActionUrlForEntryAndExitIds();
            if (!empty($idAction)) {
                return $idAction;
            }
        }

        return false;
    }
717183
public function set(\Nails\Common\Factory\Locale $oLocale = null): self
    {
        $this->oLocale = $oLocale;
        return $this;
    }
716452
public function setAlias($alias = null)
    {
        if (!empty($alias)) {
            $this->query['alias'] = $alias;
        } else {
            unset($this->query['alias']);
        }
        return $this;
    }
473028
public function setUsage($usage)
    {
        if (is_int($usage)) {
            $this->validate($usage, $this->usages);
        } else {
            $this->validate($usage, array_keys($this->usages));
            $usage = $this->usages[$usage];
        }

        $this->usage = $usage;

        return $this;
    }
783144
public function addResolution(\BlackForest\PiwikBundle\Entity\PiwikResolution $resolution)
    {
        $this->resolution[] = $resolution;

        return $this;
    }
1090056
public function setScope($scope)
    {
        if (empty($scope)) {
            return $this->clearScope();
        }

        session()->put($this->getSessionKey(static::TYPE_SCOPE), $scope);

        return $this;
    }
67911
public function visit(CreateVisit $createVisit, GetParams $getParams)
    {
        $params = $getParams->build(request('q'));

        $uuid = array_get($params, 'uuid');
        $location = array_get($params, 'location');
        $referrer = array_get($params, 'referrer');

        $createVisit->fire($uuid, $_SERVER['REMOTE_ADDR'], $location, $referrer);
    }
19669
public function visit(Visitor $visitor, Generator $generator, $data)
    {
        $generator->startObjectElement('VersionList');
        $visitor->setHeader('Content-Type', $generator->getMediaType('VersionList'));
        //@todo Needs refactoring, disabling certain headers should not be done this way
        $visitor->setHeader('Accept-Patch', false);

        $generator->startAttribute('href', $data->path);
        $generator->endAttribute('href');

        $generator->startList('VersionItem');
        foreach ($data->versions as $version) {
            $generator->startHashElement('VersionItem');

            $generator->startObjectElement('Version');
            $generator->startAttribute(
                'href',
                $this->router->generate(
                    'ezpublish_rest_loadContentInVersion',
                    array(
                        'contentId' => $version->getContentInfo()->id,
                        'versionNumber' => $version->versionNo,
                    )
                )
            );
            $generator->endAttribute('href');
            $generator->endObjectElement('Version');

            $visitor->visitValueObject($version);

            $generator->endHashElement('VersionItem');
        }
        $generator->endList('VersionItem');

        $generator->endObjectElement('VersionList');
    }
444500
public function setMuniment(\Core\Entity\Muniment $muniment = null) {
        $this->muniment = $muniment;

        return $this;
    }
956043
public function visit(Visitor $visitor, Generator $generator, $data)
    {
        $generator->startObjectElement('Version');

        $visitor->setHeader('Content-Type', $generator->getMediaType('Version'));
        $visitor->setHeader('Accept-Patch', $generator->getMediaType('VersionUpdate'));
        $this->visitVersionAttributes($visitor, $generator, $data);
        $generator->endObjectElement('Version');
    }