/** * Implementation for getting the fields of this class. * i.e. <code>$a->foo</code> */ public Value __getField(Env env, StringValue name) { SimpleView view = _view.getField(env, name); if (view == null) { return NullValue.NULL; } SimpleXMLElement e = new SimpleXMLElement(_cls, view); return e.wrapJava(env); }
/** * Implementation for getting the indices of this class. * i.e. <code>$a->foo[0]</code> */ public Value __get(Env env, Value indexV) { SimpleView view = _view.getIndex(env, indexV); if (view == null) { return NullValue.NULL; } SimpleXMLElement e = new SimpleXMLElement(_cls, view); return e.wrapJava(env); }