void SourceRootInfo::setServerVariables(Variant &server) const { if (!sandboxOn()) return; for (map<string, string>::const_iterator it = RuntimeOption::SandboxServerVariables.begin(); it != RuntimeOption::SandboxServerVariables.end(); ++it) { server.set(String(it->first), String(parseSandboxServerVariable(it->second))); } if (!m_serverVars.empty()) { server += m_serverVars; } }
void SourceRootInfo::setServerVariables(Variant &server) const { if (!sandboxOn()) return; for (map<string, string>::const_iterator it = RuntimeOption::SandboxServerVariables.begin(); it != RuntimeOption::SandboxServerVariables.end(); ++it) { server.set(String(it->first), String(parseSandboxServerVariable(it->second))); } if (!m_serverVars.empty()) { cellAddEq(*server.asCell(), make_tv<KindOfArray>(m_serverVars.get())); } }
Array SourceRootInfo::setServerVariables(Array server) const { if (!sandboxOn()) return std::move(server); for (auto it = RuntimeOption::SandboxServerVariables.begin(); it != RuntimeOption::SandboxServerVariables.end(); ++it) { server.set(String(it->first), String(parseSandboxServerVariable(it->second))); } if (!m_serverVars.empty()) { server += m_serverVars; } return std::move(server); }
Array SourceRootInfo::setServerVariables(Array server) const { if (!sandboxOn()) return server; for (auto it = RuntimeOption::SandboxServerVariables.begin(); it != RuntimeOption::SandboxServerVariables.end(); ++it) { server.set(String(it->first), String(parseSandboxServerVariable(it->second))); } { SuppressHackArrCompatNotices suppress; if (!m_serverVars.empty()) { server += m_serverVars; } } return server; }
void SourceRootInfo::setServerVariables(Variant &server) const { if (!sandboxOn()) return; for (map<string, string>::const_iterator it = RuntimeOption::SandboxServerVariables.begin(); it != RuntimeOption::SandboxServerVariables.end(); ++it) { server.set(String(it->first), String(parseSandboxServerVariable(it->second))); } if (!m_serverVars.empty()) { server += m_serverVars; } Eval::DSandboxInfo sandbox; sandbox.m_user = m_user.data(); sandbox.m_name = m_sandbox.data(); sandbox.m_path = m_path.data(); server.set("HPHP_SANDBOX_ID", sandbox.id()); // EvalDebugger needs this Eval::Debugger::RegisterSandbox(sandbox); }