note 94315 deleted from class.arrayaccess by danbrown
| From: | danbrown@php.net | Date: | Thu, 29 Oct 2009 15:12:01 +0000 |
| Subject: | note 94315 deleted from class.arrayaccess by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-162253@lists.php.net to get a copy of this message | ||
Note Submitter: James
----
Might be helpful to someone:
public function offsetSet($offset, $value) {
if (empty($offset)) {
$this->_data[] = $value;
} else {
$this->_data[$offset] = $value;
}
}
Allows use of $arrayObject[] = $extraValue; Use with some caution, of course.