eZ\Bundle\EzPublishCoreBundle\EventListener\SessionSetDynamicNameListener::getSessionName PHP Method

getSessionName() private method

private getSessionName ( string $sessionName, SiteAccess $siteAccess ) : string
$sessionName string
$siteAccess eZ\Publish\Core\MVC\Symfony\SiteAccess
return string
    private function getSessionName($sessionName, SiteAccess $siteAccess)
    {
        // Add session prefix if needed.
        if (strpos($sessionName, static::SESSION_NAME_PREFIX) !== 0) {
            $sessionName = static::SESSION_NAME_PREFIX . '_' . $sessionName;
        }
        // Check if uniqueness marker is present. If so, session name will be unique for current siteaccess.
        if (strpos($sessionName, self::MARKER) !== false) {
            $sessionName = str_replace(self::MARKER, md5($siteAccess->name), $sessionName);
        }
        return $sessionName;
    }