static bool HHVM_METHOD(Collator, sort, VRefParam arr, int64_t sort_flag /* = Collator::SORT_REGULAR */) { FETCH_COL(data, this_, false); if (!arr.isArray()) { throw_expected_array_exception(); return false; } data->clearError(); bool ret = collator_sort(arr, sort_flag, true, data->collator(), data); if (U_FAILURE(data->getErrorCode())) { return false; } return ret; }
bool c_Collator::t_sort(VRefParam arr, int64_t sort_flag /* = q_Collator$$SORT_REGULAR */) { if (!arr.isArray()) { throw_expected_array_exception(); return false; } if (!m_ucoll) { raise_warning("sort called on uninitialized Collator object"); return false; } m_errcode.clearError(); bool ret = collator_sort(arr, sort_flag, true, m_ucoll, &m_errcode); if (U_FAILURE(m_errcode.getErrorCode())) { return false; } return ret; }