twig
This commit is contained in:
14
app/controllers/Controller.php
Normal file
14
app/controllers/Controller.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace app\controllers;
|
||||
|
||||
class Controller
|
||||
{
|
||||
protected \Twig\Loader\FilesystemLoader $loader;
|
||||
protected \Twig\Environment $twig;
|
||||
public function __construct()
|
||||
{
|
||||
$this->loader = new \Twig\Loader\FilesystemLoader(__DIR__.'/../views');
|
||||
$this->twig = new \Twig\Environment($this->loader, ['cache' => 'app/views/cache']);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user