Neos\Flow\Session\Session::getTags PHP Method

getTags() public method

Returns the tags this session has been tagged with.
public getTags ( ) : array
return array The tags or an empty array if there aren't any
    public function getTags()
    {
        if ($this->started !== true) {
            throw new Exception\SessionNotStartedException('Tried to retrieve tags from a session which has not been started yet.', 1355141501);
        }
        return $this->tags;
    }

Usage Example

 /**
  * @test
  * @expectedException \Neos\Flow\Session\Exception\SessionNotStartedException
  */
 public function getTagsThrowsExceptionIfCalledOnNonStartedSession()
 {
     $session = new Session();
     $session->getTags();
 }