|
@@ 108-110 (lines=3) @@
|
| 105 |
|
*/ |
| 106 |
|
protected function save($dsl, $context) |
| 107 |
|
{ |
| 108 |
|
if (!isset($dsl['file']) || (!isset($dsl['body']) && !isset($dsl['template']))) { |
| 109 |
|
throw new \Exception("Can not save file: name or body or template missing"); |
| 110 |
|
} |
| 111 |
|
|
| 112 |
|
if (is_string($dsl['body'])) { |
| 113 |
|
$contents = $this->resolveReferencesInText($dsl['body']); |
|
@@ 142-144 (lines=3) @@
|
| 139 |
|
*/ |
| 140 |
|
protected function append($dsl, $context) |
| 141 |
|
{ |
| 142 |
|
if (!isset($dsl['file']) || (!isset($dsl['body']) && !isset($dsl['template']))) { |
| 143 |
|
throw new \Exception("Can not append to file: name or body or template missing"); |
| 144 |
|
} |
| 145 |
|
|
| 146 |
|
if (is_string($dsl['body'])) { |
| 147 |
|
$contents = $this->resolveReferencesInText($dsl['body']); |
|
@@ 171-173 (lines=3) @@
|
| 168 |
|
*/ |
| 169 |
|
protected function prepend($dsl, $context) |
| 170 |
|
{ |
| 171 |
|
if (!isset($dsl['file']) || (!isset($dsl['body']) && !isset($dsl['template']))) { |
| 172 |
|
throw new \Exception("Can not prepend to file: name or body or template missing"); |
| 173 |
|
} |
| 174 |
|
|
| 175 |
|
if (is_string($dsl['body'])) { |
| 176 |
|
$contents = $this->resolveReferencesInText($dsl['body']); |