diff --git a/src/View/Linker.php b/src/View/Linker.php index a068e61..4cefbcc 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]);