/** * Evaluates the expression. * * @param env the calling environment. * * @return the expression value. */ public Value eval(Env env) { QuercusClass cl = env.findClass(_className); if (cl == null) { throw env.createErrorException(L.l("{0} @is an unknown class", _className)); } StringValue nameV = _nameV; AbstractFunction fun = cl.getFunction(nameV); Value [] values = evalArgs(env, _args); Value qThis = env.getThis(); env.pushCall(this, qThis, values); try { env.checkTimeout(); return(cl.callMethod(env, qThis, nameV, nameV.hashCode(), values)); } finally { env.popCall(); } }
/** * Evaluates the expression. * * @param env the calling environment. * * @return the expression value. */ public override Value eval(Env env) { Value qThis = env.getThis(); QuercusClass cls = qThis.getQuercusClass(); if (cls == null) { env.error(L.l("no calling class found"), getLocation()); return(NullValue.NULL); } StringValue methodName = _methodName.evalStringValue(env); int hash = methodName.hashCodeCaseInsensitive(); Value [] values = evalArgs(env, _args); env.pushCall(this, cls, values); try { env.checkTimeout(); return(cls.callMethod(env, qThis, methodName, hash, values)); } finally { env.popCall(); } }
/** * Evaluates the expression. * * @param env the calling environment. * * @return the expression value. */ public Value eval(Env env) { Value qThis = env.getThis(); QuercusClass cls = qThis.getQuercusClass(); if (cls == null) { env.error(L.l("no calling class found"), getLocation()); return(NullValue.NULL); } Value [] values = evalArgs(env, _args); env.pushCall(this, cls, values); try { env.checkTimeout(); return(cls.callMethod(env, qThis, _methodName, _hash, values)); } finally { env.popCall(); } }
// // evaluation // /** * Evaluates the expression. * * @param env the calling environment. * * @return the expression value. */ public override Value eval(Env env) { QuercusClass cl = _className.evalQuercusClass(env); if (cl == null) { env.error(L.l("no matching class {0}", _className), getLocation()); } StringValue nameV = _methodName; int hash = nameV.hashCodeCaseInsensitive(); return(cl.callMethod(env, env.getThis(), nameV, hash, evalArgs(env, _args))); }
/** * Calls an object method. */ public static Value call_user_method(Env env, StringValue name, Value obj, Value [] args) { if (obj.isObject()) { return(obj.callMethod(env, name, args)); } else { QuercusClass cls = env.getClass(obj.ToString()); Value result = cls.callMethod(env, env.getThis(), name, name.hashCode(), args); return(result.copyReturn()); } }
// // evaluation // /** * Evaluates the expression. * * @param env the calling environment. * * @return the expression value. */ public override Value eval(Env env) { string className = _className.evalString(env); QuercusClass cl = env.findClass(className); if (cl == null) { env.error(L.l("no matching class {0}", className), getLocation()); } StringValue methodName = _methodName.evalStringValue(env); int hash = methodName.hashCodeCaseInsensitive(); Value [] args = evalArgs(env, _args); return(cl.callMethod(env, env.getThis(), methodName, hash, args)); }
/** * Evaluates the callback with no arguments. * * @param env the calling environment */ public override Value call(Env env) { return(_qClass.callMethod(env, _qThis, _methodName, _hash)); }