本文整理汇总了C++中CArrRef::isNull方法的典型用法代码示例。如果您正苦于以下问题:C++ CArrRef::isNull方法的具体用法?C++ CArrRef::isNull怎么用?C++ CArrRef::isNull使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CArrRef
的用法示例。
在下文中一共展示了CArrRef::isNull方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: f_stream_context_create
Variant f_stream_context_create(CArrRef options /* = null_array */,
CArrRef params /* = null_array */) {
if (!options.isNull() && !StreamContext::validateOptions(options)) {
return false;
}
return Resource(NEWOBJ(StreamContext)(options, params));
}
示例2: f_spl_autoload_functions
Variant f_spl_autoload_functions() {
CArrRef handlers = AutoloadHandler::s_instance->getHandlers();
if (handlers.isNull())
return false;
else
return handlers.values();
}
示例3: EnsureIntKeys
Array ArrayUtil::EnsureIntKeys(CArrRef input) {
assert(!input.isNull());
if (!input.getArrayData()->isVectorData()) {
return input.values();
}
return input;
}
示例4: same
bool same(CVarRef v1, CArrRef v2) {
bool null1 = v1.isNull();
bool null2 = v2.isNull();
if (null1 && null2) return true;
if (null1 || null2) return false;
if (!v1.isArray()) return false;
auto const ad = v1.getArrayData();
return v2->equal(ad, true);
}
示例5: f_stream_context_get_default
Variant f_stream_context_get_default(CArrRef options /* = null_array */) {
Resource &resource = g_context->getStreamContext();
if (resource.isNull()) {
resource = Resource(NEWOBJ(StreamContext)(Array::Create(),
Array::Create()));
g_context->setStreamContext(resource);
}
StreamContext *context = resource.getTyped<StreamContext>();
if (!options.isNull() && !f_stream_context_set_option0(context, options)) {
return false;
}
return resource;
}
示例6: write
void VariableSerializer::write(CArrRef v) {
if (m_type == APCSerialize && !v.isNull() && v->isStatic()) {
union {
char buf[8];
ArrayData *ad;
} u;
u.ad = v.get();
m_buf->append("A:");
m_buf->append(u.buf, 8);
m_buf->append(';');
} else {
v.serialize(this);
}
}
示例7: Log
void ExtendedLogger::Log(LogLevelType level, CArrRef stackTrace,
bool escape /* = true */,
bool escapeMore /* = false */) {
assert(!escapeMore || escape);
ThreadData *threadData = s_threadData.get();
if (++threadData->message > MaxMessagesPerRequest &&
MaxMessagesPerRequest >= 0) {
return;
}
if (stackTrace.isNull()) return;
if (UseLogFile) {
FILE *f = Output ? Output : GetStandardOut(level);
PrintStackTrace(f, stackTrace, escape, escapeMore);
FILE *tf = threadData->log;
if (tf) {
PrintStackTrace(tf, stackTrace, escape, escapeMore);
}
}
}
示例8: Log
void ExtendedLogger::Log(bool err, CArrRef stackTrace,
bool escape /* = true */,
bool escapeMore /* = false */) {
ASSERT(!escapeMore || escape);
ThreadData *threadData = s_threadData.get();
if (++threadData->message > MaxMessagesPerRequest &&
MaxMessagesPerRequest >= 0) {
return;
}
if (stackTrace.isNull()) return;
// TODO Should we also send the stacktrace to LogAggregator?
if (UseLogFile) {
FILE *f = Output ? Output : (err ? stderr : stdout);
PrintStackTrace(f, stackTrace, escape, escapeMore);
FILE *tf = threadData->log;
if (tf) {
PrintStackTrace(tf, stackTrace, escape, escapeMore);
}
}
}