/** * Evaluates the expression. * * @param env the calling environment. * @return the expression value. */ @Override public Var evalVar(Env env) { Value obj = env.getThis(); if (obj.isNull()) { cannotUseThisError(env); return new Var(); } return obj.getThisFieldVar(env, _name); }
/** Evaluates as an array index assign ($a[index] = value). */ @Override public Value evalArrayAssign(Env env, Value index, Value value) { Value obj = env.getThis(); if (obj.isNull()) { cannotUseThisError(env); } Value fieldVar = obj.getThisFieldVar(env, _name); // php/03mm return fieldVar.put(index, value); }