/** * Evaluates the expression. * * @param env the calling environment. * * @return the expression value. */ public override Value eval(Env env) { string className = _className.evalString(env); QuercusClass qClass = env.getClass(className); StringValue varName = _varName.evalStringValue(env); return(qClass.getStaticFieldValue(env, varName)); }
/** * Evaluates the expression. * * @param env the calling environment. * * @return the expression value. */ public Value eval(Env env) { if (_value != null) { string msg = _value.evalString(env); return(env.die(msg)); } else { return(env.die()); } }
// // 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 expression. * * @param env the calling environment. * * @return the expression value. */ public Value eval(Env env) { string name = _name.evalString(env).intern(); QuercusClass cl = env.findAbstractClass(name); _fullArgs = _args; Value [] args = new Value[_args.length]; for (int i = 0; i < args.length; i++) { args[i] = _args[i].eval(env); } env.pushCall(this, NullValue.NULL, args); try { env.checkTimeout(); return(cl.callNew(env, args)); } finally { env.popCall(); } }