|
@@ 112-118 (lines=7) @@
|
| 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']); |
| 114 |
|
} elseif (is_string($dsl['template'])) { |
| 115 |
|
$contents = $this->resolveReferencesInText(file_get_contents($this->resolveReferences($dsl['template']))); |
| 116 |
|
} else { |
| 117 |
|
throw new \Exception("Can not save file: either body or template tag must be a string"); |
| 118 |
|
} |
| 119 |
|
|
| 120 |
|
$fileName = $this->referenceResolver->resolveReference($dsl['file']); |
| 121 |
|
|
|
@@ 146-152 (lines=7) @@
|
| 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']); |
| 148 |
|
} elseif (is_string($dsl['template'])) { |
| 149 |
|
$contents = $this->resolveReferencesInText(file_get_contents($this->resolveReferences($dsl['template']))); |
| 150 |
|
} else { |
| 151 |
|
throw new \Exception("Can not append to file: either body or template tag must be a string"); |
| 152 |
|
} |
| 153 |
|
|
| 154 |
|
$fileName = $this->referenceResolver->resolveReference($dsl['file']); |
| 155 |
|
|
|
@@ 175-181 (lines=7) @@
|
| 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']); |
| 177 |
|
} elseif (is_string($dsl['template'])) { |
| 178 |
|
$contents = $this->resolveReferencesInText(file_get_contents($this->resolveReferences($dsl['template']))); |
| 179 |
|
} else { |
| 180 |
|
throw new \Exception("Can not append to file: either body or template tag must be a string"); |
| 181 |
|
} |
| 182 |
|
|
| 183 |
|
$fileName = $this->referenceResolver->resolveReference($dsl['file']); |
| 184 |
|
|