*
* @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));
Value []values = evalArgs(env, _args);
Value oldThis = env.getThis();
// php/09qe
Value qThis = oldThis;
/*
if (oldThis.isNull()) {
qThis = cl;
env.setThis(qThis);
}
else
qThis = oldThis;
*/
// php/024b
// qThis = cl;
env.pushCall(this, cl, values);
// QuercusClass oldClass = env.setCallingClass(cl);
try {
env.checkTimeout();
return cl.callMethod(env, qThis, _methodName, _hash, values);
} finally {
env.popCall();
env.setThis(oldThis);
// env.setCallingClass(oldClass);
}