/** * Set a value given it's key e.g. $A['title'] = 'foo'; * * Required definitions of interface ArrayAccess * @link http://www.php.net/manual/en/class.arrayaccess.php */ public function offsetSet($name, $val) { // canary... if ($name === null && $val instanceof MingoField) { $this->addField($val); } //if parent::offsetSet($name, $val); }