| @@ 22-27 (lines=6) @@ | ||
| 19 | */ |
|
| 20 | public function __construct(array $original = []) |
|
| 21 | { |
|
| 22 | foreach ($original as $key => $embed) { |
|
| 23 | if (!$embed instanceof Embed) { |
|
| 24 | continue; |
|
| 25 | } |
|
| 26 | $this->current[$key] = clone $embed; |
|
| 27 | } |
|
| 28 | parent::__construct($original); |
|
| 29 | } |
|
| 30 | ||
| @@ 77-82 (lines=6) @@ | ||
| 74 | public function rollback() |
|
| 75 | { |
|
| 76 | $this->current = []; |
|
| 77 | foreach ($this->original as $key => $embed) { |
|
| 78 | if (!$embed instanceof Embed) { |
|
| 79 | continue; |
|
| 80 | } |
|
| 81 | $this->current[$key] = clone $embed; |
|
| 82 | } |
|
| 83 | $this->remove = []; |
|
| 84 | return $this; |
|
| 85 | } |
|