public function take($key)
    {
        self::requireSession();
        if (false === \array_key_exists($key, $_SESSION)) {
            throw new SessionException(\sprintf('key "%s" not found in session', $key));
        }
        $value = $_SESSION[$key];
        unset($_SESSION[$key]);

        return $value;
    }
public function take($key)
    {
        self::requireSession();
        if (false === \array_key_exists($key, $_SESSION)) {
            throw new SessionException(\sprintf('key "%s" not found in session', $key));
        }
        $value = $_SESSION[$key];
        unset($_SESSION[$key]);

        return $value;
    }
public function take ( $ key ) { self :: requireSession ( ) ; if ( false === \ array_key_exists ( $ key , $ _SESSION ) ) { throw new SessionException ( \ sprintf ( 'key "%s" not found in session' , $ key ) ) ; } $ value = $ _SESSION [ $ key ] ; unset ( $ _SESSION [ $ key ] ) ; return $ value ; }
Get value, delete key.

@param string $key

@return mixed
Get value delete key .