MAPG-238 include view with @include
All checks were successful
soko-web/pipeline/pr-master This commit looks good
All checks were successful
soko-web/pipeline/pr-master This commit looks good
This commit is contained in:
parent
78f891fbff
commit
754a23706a
@ -97,7 +97,12 @@ class Linker
|
|||||||
|
|
||||||
fwrite($outputFileHandle, $extra[0]);
|
fwrite($outputFileHandle, $extra[0]);
|
||||||
while (($line = fgets($inputFileHandle)) !== false) {
|
while (($line = fgets($inputFileHandle)) !== false) {
|
||||||
fwrite($outputFileHandle, $line);
|
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]);
|
fwrite($outputFileHandle, $extra[1]);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user