Exemple #1
0
 /**
  * {@inheritdoc}
  */
 public function offsetSet($offset, $value)
 {
     //Add the child to the parent
     if ($this->parent) {
         $this->parent->offsetSet($offset, $value);
     }
     //Add child to itself
     parent::offsetSet($offset, $value);
 }
Exemple #2
0
 public function offsetSet($offset, $value)
 {
     if ($value instanceof Option) {
         $value->attr('value', $offset);
     } else {
         $value = Option::create($offset, $value);
     }
     parent::offsetSet($offset, $value);
 }