Пример #1
0
bool Object::equal(CObjRef v2) const {
    if (m_px == v2.get()) {
        check_collection_compare(m_px);
        return true;
    }
    if (!m_px || !v2.get()) {
        return false;
    }
    check_collection_compare(m_px, v2.get());
    if (isResource() || v2.isResource()) {
        return false;
    }
    return (v2.get()->o_isClass(m_px->o_getClassName()) &&
            toArray().equal(v2.toArray()));
}
Пример #2
0
bool Array::more(CObjRef v2) const {
  if (m_px == nullptr || v2.get() == nullptr) {
    return HPHP::more(toBoolean(), v2.toBoolean());
  }
  check_collection_compare(v2.get());
  return false;
}
Пример #3
0
bool Object::less(const Object& v2) const {
  check_collection_compare(get(), v2.get());
  if (UNLIKELY(m_obj->instanceof(SystemLib::s_DateTimeInterfaceClass))) {
    return DateTimeData::getTimestamp(*this) <
        DateTimeData::getTimestamp(v2);
  }
  return m_obj != v2.m_obj && toArray().less(v2.toArray());
}
Пример #4
0
bool Object::less(const Object& v2) const {
  check_collection_compare(m_px, v2.get());
  if (UNLIKELY(m_px->instanceof(SystemLib::s_DateTimeInterfaceClass))) {
    return c_DateTime::GetTimestamp(*this) <
        c_DateTime::GetTimestamp(v2);
  }
  return m_px != v2.m_px && toArray().less(v2.toArray());
}
Пример #5
0
double Object::toDoubleForCompare() const {
    check_collection_compare(m_px);
    return toDouble();
}
Пример #6
0
int64 Object::toInt64ForCompare() const {
    check_collection_compare(m_px);
    return toInt64();
}
Пример #7
0
bool Object::more(CObjRef v2) const {
    check_collection_compare(m_px, v2.get());
    return m_px != v2.m_px && toArray().more(v2.toArray());
}
Пример #8
0
int64_t Object::toInt64ForCompare() const {
  check_collection_compare(get());
  return toInt64();
}