use of lucee.runtime.util.VariableUtilImpl in project Lucee by lucee.
the class Elvis method _operate.
private static boolean _operate(PageContext pc, double scope, Collection.Key[] varNames, int startIndex) {
Object defVal = null;
try {
Object coll = VariableInterpreter.scope(pc, (int) scope, false);
// Object coll =pc.scope((int)scope);
VariableUtilImpl vu = ((VariableUtilImpl) pc.getVariableUtil());
for (int i = startIndex; i < varNames.length; i++) {
coll = vu.getCollection(pc, coll, varNames[i], defVal);
if (coll == defVal)
return false;
}
} catch (Throwable t) {
ExceptionUtil.rethrowIfNecessary(t);
return false;
}
return true;
}
use of lucee.runtime.util.VariableUtilImpl in project Lucee by lucee.
the class IsDefined method call.
public static boolean call(PageContext pc, double scope, Collection.Key[] varNames) {
Object defVal = NullSupportHelper.NULL(pc);
try {
Object coll = VariableInterpreter.scope(pc, (int) scope, false);
// Object coll =pc.scope((int)scope);
VariableUtilImpl vu = ((VariableUtilImpl) pc.getVariableUtil());
for (int i = 0; i < varNames.length; i++) {
coll = vu.getCollection(pc, coll, varNames[i], defVal);
if (coll == defVal)
return false;
}
} catch (Throwable t) {
ExceptionUtil.rethrowIfNecessary(t);
return false;
}
return true;
}
use of lucee.runtime.util.VariableUtilImpl in project Lucee by lucee.
the class TOObjects method set.
@Override
public Object set(PageContext pc, Key key, Object value) throws PageException {
log(key, value);
VariableUtilImpl var = (VariableUtilImpl) pc.getVariableUtil();
return var.set(pc, o, key, value);
// return TraceObjectSupport.toTraceObject(debugger,var.set(pc, o, key, value),type,category,text);
}
use of lucee.runtime.util.VariableUtilImpl in project Lucee by lucee.
the class TOObjects method get.
@Override
public Object get(PageContext pc, Key key) throws PageException {
log(key.getString());
VariableUtilImpl var = (VariableUtilImpl) pc.getVariableUtil();
return var.get(pc, o, key);
// return TraceObjectSupport.toTraceObject(debugger,var.get(pc, o, key),type,category,text);
}
use of lucee.runtime.util.VariableUtilImpl in project Lucee by lucee.
the class TOObjects method callWithNamedValues.
@Override
public Object callWithNamedValues(PageContext pc, Key key, Struct args) throws PageException {
log(key.getString());
VariableUtilImpl var = (VariableUtilImpl) pc.getVariableUtil();
return var.callFunctionWithNamedValues(pc, o, key, args);
}
Aggregations