Ejemplo n.º 1
0
 /**
  * Custom offsetSet() implementation to allow assignment with a null offset to append to the
  * chain
  *
  * @param  mixed $offset
  * @param  mixed $value
  * @return void
  */
 public function offsetSet($offset, $value)
 {
     if ($offset === null) {
         // $list[] = 'foo' maps to $list->append('foo')
         $this->append($value);
     } else {
         // Use the default implementation
         parent::offsetSet($offset, $value);
     }
 }