def METHOD_NAME(self, old_session):
    """Env object setter"""
    result = old_session["ENV"]
    rename_key(result, "CWD", "PWD")
    rename_key(result, "WRITE_TMPDIR", "WRITEABLE_TMPDIR")
    rename_key(result, "WRITE_WEBDIR", "WRITEABLE_WEBDIR")
    remove_key(result, "TEXTEDITOR")
    # Add some environment variables from old "SRV" object.
    result["ADDR"] = old_session["SRV"]["addr"]
    result["HOME"] = old_session["SRV"]["home"]
    result["HOST"] = old_session["SRV"]["host"]
    result["PHP_VERSION"] = old_session["SRV"]["phpver"]
    result["PATH_SEP"] = old_session["SRV"]["separator"]
    result["HTTP_SOFTWARE"] = old_session["SRV"]["soft"]
    result["USER"] = old_session["SRV"]["user"]
    result["WEB_ROOT"] = old_session["SRV"]["webroot"]
    result["CLIENT_ADDR"] = old_session["SRV"]["client_addr"]
    # $PLATFORM
    result["PLATFORM"] = old_session["SRV"]["os"].split()[0].lower()
    if result["PLATFORM"] in ["unknow", "unknown", ""]:
        if result["PATH_SEP"] == "\\":
            result["PLATFORM"] = "windows"
        else:
            result["PLATFORM"] = "unix"
    return result