Neos\Flow\Session\SessionManager::getSessionsByTag PHP Method

getSessionsByTag() public method

Returns all sessions which are tagged by the specified tag.
public getSessionsByTag ( string $tag ) : array
$tag string A valid Cache Frontend tag
return array A collection of Session objects or an empty array if tag did not match
    public function getSessionsByTag($tag)
    {
        $taggedSessions = [];
        foreach ($this->metaDataCache->getByTag(Session::TAG_PREFIX . $tag) as $sessionIdentifier => $sessionInfo) {
            $session = new Session($sessionIdentifier, $sessionInfo['storageIdentifier'], $sessionInfo['lastActivityTimestamp'], $sessionInfo['tags']);
            $taggedSessions[] = $session;
        }
        return $taggedSessions;
    }