Skip to content

Commit c35f4f7

Browse files
committed
Change compile to warmup, make it return nothing.
1 parent aded984 commit c35f4f7

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/MtHaml/Support/Php/Executor.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function __construct(Environment $environment, array $options)
3434
*/
3535
public function display($file, array $variables)
3636
{
37-
$fun = $this->compile($file);
37+
$fun = $this->compileFile($file);
3838
$fun($variables);
3939
}
4040

@@ -59,7 +59,12 @@ public function render($file, array $variables)
5959
return ob_get_clean();
6060
}
6161

62-
public function compile($file)
62+
public function warmup($file)
63+
{
64+
$this->compileFile($file);
65+
}
66+
67+
private function compileFile($file)
6368
{
6469
if (!file_exists($file)) {
6570
throw new Exception(sprintf(

0 commit comments

Comments
 (0)