fbstring PhpFunc::getCppSig(bool fullyQualified /* = true */) const { std::ostringstream out; out << getPrefixedCppName(fullyQualified) << "("; bool firstParam = true; if (isVarArgs()) { if (!firstParam) { out << ", "; } out << "int"; firstParam = false; } for (auto const& param : m_params) { if (!firstParam) { out << ", "; } out << param.getCppType(); firstParam = false; } if (isVarArgs()) { assert(!firstParam); out << ", HPHP::Array const&"; } out << ")"; return out.str(); }
fbstring PhpFunc::getCppSig() const { std::ostringstream out; fbstring nm = getCppName(); fbstring lowername = nm; std::transform(nm.begin(), nm.end(), lowername.begin(), std::ptr_fun<int, int>(std::tolower)); if (!isMethod()) { out << "HPHP::f_" << lowername << "("; } else { if (isStatic()) { out << "HPHP::c_" << className() << "::ti_" << lowername << "("; } else { out << "HPHP::c_" << className() << "::t_" << lowername << "("; } } bool firstParam = true; if (isVarArgs()) { if (!firstParam) { out << ", "; } out << "int"; firstParam = false; } for (auto const& param : m_params) { if (!firstParam) { out << ", "; } out << param.getCppType(); firstParam = false; } if (isVarArgs()) { assert(!firstParam); out << ", HPHP::Array const&"; } out << ")"; return out.str(); }