src/Session/Segment.php
public function get($key, $alt = null)
    {
        $this->resumeSession();

        return $_SESSION[$this->name][$key] ?? $alt;
    }
public function get($key, $alt = null)
    {
        $this->resumeSession();

        return $_SESSION[$this->name][$key] ?? $alt;
    }
public function get ( $ key , $ alt = null ) { $ this -> resumeSession ( ) ; return $ _SESSION [ $ this -> name ] [ $ key ] ?? $ alt ; }
Returns the value of a key in the segment.

@param string $key The key in the segment.

@param mixed  $alt An alternative value to return if the key is not set.

@return mixed
Returns the value of a key in the segment .