public function write($userdata, $splash, $session, $sessionId, $expiry)
    {

        $ini = new Ini();
        $store = $session->folder . DIRECTORY_SEPARATOR;

        if (!$ini->is($store)) {
            if (!$ini->create($store)) {
                throw new \Exception("Could not create the $store folder. Please create this manually and check it hass writable permissions");
                return false;
            }
        }

        //We need to know the array;
        if (!is_array($splash)) return false;

        $sfile = $store . $sessionId . ".ini";


        //We create the session file;
        if (!($sini = $ini->create($sfile))) {
            throw new \Exception("Could not create the session file");
            return false;
        }
        //Temporarily chmode the file;
        $ini->chmod($sfile, 0755);

        $splash['expiry'] = $expiry;
        $splash['active'] = time();
        $splash['key'] = $sessionId;
        $splash['registry'] = static::quote("'" . $userdata . "'");


        //Now write to file
        if (!$ini->write($sfile, $ini->toIniString($splash))) {
            throw new \Exception("Could not write out to the configuration file");
            return false;
        }

        return true;
    }