note 114040 added to arrayobject.offsetget

From: Date: Sun, 05 Jan 2014 08:26:23 +0000
Subject: note 114040 added to arrayobject.offsetget
Groups: php.notes 
Request: Send a blank email to php-notes+get-198110@lists.php.net to get a copy of this message
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; } } ---- Server IP: 72.52.91.14 Probable Submitter: 72.52.91.14 ---- Manual Page -- http://php.net/manual/en/arrayobject.offsetget.php Edit -- https://master.php.net/note/edit/114040 Del: integrated -- https://master.php.net/note/delete/114040/integrated Del: useless -- https://master.php.net/note/delete/114040/useless Del: bad code -- https://master.php.net/note/delete/114040/bad+code Del: spam -- https://master.php.net/note/delete/114040/spam Del: non-english -- https://master.php.net/note/delete/114040/non-english Del: in docs -- https://master.php.net/note/delete/114040/in+docs Del: other reasons-- https://master.php.net/note/delete/114040 Reject -- https://master.php.net/note/reject/114040 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#198110) next »