/**
 * Writes session data and ends session
 *
 * @return  void
 *
 * @see     session_write_close()
 * @since   4.0.0
 */
public function close() : void
{
    // Before storing data to the session, we serialize and encode the Registry
    $_SESSION['joomla'] = base64_encode(serialize(clone $this->data));
    parent::close();
}