| @@ 58-63 (lines=6) @@ | ||
| 55 | if ($value->parentNode != $this->parentNode) { |
|
| 56 | $value->parentNode = $this->parentNode; |
|
| 57 | } |
|
| 58 | if ($this->offsetExists( $name )) { |
|
| 59 | $old = $this->offsetGet( $name ); |
|
| 60 | if ($old !== $value) { |
|
| 61 | $old->parentNode = null; |
|
| 62 | } |
|
| 63 | } |
|
| 64 | parent::offsetSet($name, $value); |
|
| 65 | } |
|
| 66 | ||
| @@ 69-74 (lines=6) @@ | ||
| 66 | ||
| 67 | public function offsetUnset($name) |
|
| 68 | { |
|
| 69 | if ($this->offsetExists( $name )) { |
|
| 70 | $node = $this->offsetGet( $name ); |
|
| 71 | if ($node->parentNode) { |
|
| 72 | $node->parentNode = null; |
|
| 73 | } |
|
| 74 | } |
|
| 75 | parent::offsetUnset( $name ); |
|
| 76 | } |
|
| 77 | ||