public static function pull($key)
    {
        if (isset($_SESSION[self::$prefix . $key])) {
            $value = $_SESSION[self::$prefix . $key];
            unset($_SESSION[self::$prefix . $key]);

            return $value;
        }

        return null;
    }
public static function pull($key)
    {
        if (isset($_SESSION[self::$prefix . $key])) {
            $value = $_SESSION[self::$prefix . $key];
            unset($_SESSION[self::$prefix . $key]);

            return $value;
        }

        return null;
    }
public static function pull ( $ key ) { if ( isset ( $ _SESSION [ self :: $ prefix . $ key ] ) ) { $ value = $ _SESSION [ self :: $ prefix . $ key ] ; unset ( $ _SESSION [ self :: $ prefix . $ key ] ) ; return $ value ; } return null ; }
Extract session item, delete session item and finally return the item.

@param string $key → item to extract

@return mixed|null → return item or null when key does not exists
Extract session item delete session item and finally return the item .