const TypedValue* APCLocalArray::NvGetStr(const ArrayData* ad, const StringData* key) { auto a = asApcArray(ad); auto index = a->getIndex(key); if (index == -1) return nullptr; return GetValueRef(a, index).asTypedValue(); }
member_rval::ptr_u APCLocalArray::NvGetStr(const ArrayData* ad, const StringData* key) { auto a = asApcArray(ad); auto index = a->getIndex(key); if (index == -1) return nullptr; return GetValueRef(a, index); }
ArrayData* APCLocalArray::loadElems() const { auto count = m_arr->size(); ArrayData* elems; if (m_arr->isPacked()) { PackedArrayInit ai(count); for (uint i = 0; i < count; i++) { ai.append(GetValueRef(this, i)); } elems = ai.create(); } else { ArrayInit ai(count, ArrayInit::Mixed{}); for (uint i = 0; i < count; i++) { ai.add(getKey(i), GetValueRef(this, i), true); } elems = ai.create(); } if (elems->isStatic()) { elems = elems->copy(); } return elems; }
const TypedValue* APCLocalArray::NvGetInt(const ArrayData* ad, int64_t k) { auto a = asApcArray(ad); auto index = a->getIndex(k); if (index == -1) return nullptr; return GetValueRef(a, index).asTypedValue(); }
member_rval::ptr_u APCLocalArray::NvGetInt(const ArrayData* ad, int64_t k) { auto a = asApcArray(ad); auto index = a->getIndex(k); if (index == -1) return nullptr; return GetValueRef(a, index); }