Merge pull request 'MAPG-238 include view with @include' (#19) from feature/MAPG-238-include-possibility-for-templating-engine into master
All checks were successful
soko-web/pipeline/head This commit looks good
All checks were successful
soko-web/pipeline/head This commit looks good
Reviewed-on: #19
This commit is contained in:
commit
6fdd25ae4b
@ -97,8 +97,13 @@ class Linker
|
||||
|
||||
fwrite($outputFileHandle, $extra[0]);
|
||||
while (($line = fgets($inputFileHandle)) !== false) {
|
||||
if (preg_match('/^\s*@include\((.*)\)\s*$/', $line, $matches) === 1) {
|
||||
$include = file_get_contents(ROOT . '/views/' . $matches[1] . '.php');
|
||||
fwrite($outputFileHandle, $include);
|
||||
} else {
|
||||
fwrite($outputFileHandle, $line);
|
||||
}
|
||||
}
|
||||
fwrite($outputFileHandle, $extra[1]);
|
||||
|
||||
fclose($inputFileHandle);
|
||||
|
Loading…
Reference in New Issue
Block a user