public override PhpValue GetValue(Context ctx, object instance) { var runtime_fields = ContainingType.GetRuntimeFields(instance); // (instance)._runtime_fields[_name] if (runtime_fields != null && runtime_fields.TryGetValue(_name, out var value)) { return(value); } else { PhpException.UndefinedProperty(ContainingType.Name, _name.ToString()); return(PhpValue.Null); } }
/// <summary> /// Outputs error: Undefined offset ({0}). /// </summary> public static void UndefinedOffset(IntStringKey key) { Throw(PhpError.Error, string.Format(ErrResources.undefined_offset, key.ToString())); }
public override bool Remove(IntStringKey key) { state.Remove(key.ToString()); return true; }