note 114040 deleted from arrayobject.offsetget by tularis

From: Date: Sun, 05 Jan 2014 16:21:00 +0000
Subject: note 114040 deleted from arrayobject.offsetget by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-198111@lists.php.net to get a copy of this message
Note Submitter: a6y at xakep dot ru ---- Try this one to overload offsetGet() class ArrayObjectP4k extends ArrayObject { public function offsetGet($offset) { // Возвращаем себя, есди находимся на дереве, // или лист(с типом), если на конце // Используем позднее статическое связывание // для превента возврата типа ArrayObject return $this->offsetExists($offset) ? (is_array(parent::offsetGet($offset)) ? new static (parent::offsetGet($offset)) : parent::offsetGet($offset)) : null; } }

« previous php.notes (#198111) next »