protected static function restoreForeignSession()
{
if (!empty(self::$restoreSession)) {
session_write_close();
session_name(self::$restoreSession["name"]);
if (isset(self::$restoreSession["id"]) && !empty(self::$restoreSession["id"])) {
session_id(self::$restoreSession["id"]);
@session_start();
}
return true;
}
return false;
}