|
@@ 80-86 (lines=7) @@
|
| 77 |
|
throw new \Exception("Can not save file: name or body or template missing"); |
| 78 |
|
} |
| 79 |
|
|
| 80 |
|
if (is_string($dsl['body'])) { |
| 81 |
|
$contents = $this->resolveReferencesInText($dsl['body']); |
| 82 |
|
} elseif (is_string($dsl['template'])) { |
| 83 |
|
$contents = $this->resolveReferencesInText(file_get_contents($this->resolveReferences($dsl['template']))); |
| 84 |
|
} else { |
| 85 |
|
throw new \Exception("Can not save file: either body or template tag must be a string"); |
| 86 |
|
} |
| 87 |
|
|
| 88 |
|
$fileName = $this->referenceResolver->resolveReference($dsl['file']); |
| 89 |
|
|
|
@@ 114-120 (lines=7) @@
|
| 111 |
|
throw new \Exception("Can not append to file: name or body or template missing"); |
| 112 |
|
} |
| 113 |
|
|
| 114 |
|
if (is_string($dsl['body'])) { |
| 115 |
|
$contents = $this->resolveReferencesInText($dsl['body']); |
| 116 |
|
} elseif (is_string($dsl['template'])) { |
| 117 |
|
$contents = $this->resolveReferencesInText(file_get_contents($this->resolveReferences($dsl['template']))); |
| 118 |
|
} else { |
| 119 |
|
throw new \Exception("Can not append to file: either body or template tag must be a string"); |
| 120 |
|
} |
| 121 |
|
|
| 122 |
|
$fileName = $this->referenceResolver->resolveReference($dsl['file']); |
| 123 |
|
|
|
@@ 143-149 (lines=7) @@
|
| 140 |
|
throw new \Exception("Can not prepend to file: name or body or template missing"); |
| 141 |
|
} |
| 142 |
|
|
| 143 |
|
if (is_string($dsl['body'])) { |
| 144 |
|
$contents = $this->resolveReferencesInText($dsl['body']); |
| 145 |
|
} elseif (is_string($dsl['template'])) { |
| 146 |
|
$contents = $this->resolveReferencesInText(file_get_contents($this->resolveReferences($dsl['template']))); |
| 147 |
|
} else { |
| 148 |
|
throw new \Exception("Can not append to file: either body or template tag must be a string"); |
| 149 |
|
} |
| 150 |
|
|
| 151 |
|
$fileName = $this->referenceResolver->resolveReference($dsl['file']); |
| 152 |
|
|