diff --git a/src/View/Linker.php b/src/View/Linker.php index ca67886..c0d63e1 100644 --- a/src/View/Linker.php +++ b/src/View/Linker.php @@ -97,7 +97,12 @@ class Linker fwrite($outputFileHandle, $extra[0]); 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]);