microphp/Core/Blade.php

15 lines
440 B
PHP
Raw Normal View History

2023-04-05 23:26:44 +03:00
<?php
include_once "BladeOne.php";
include_once "BladeOneCache.php";
define("VIEW_DIR", realpath(__DIR__ . '/../views/'));
define("VIEW_CACHE_DIR", realpath(__DIR__ . '/../cache/'));
function view($name, $args = [])
{
$blade = new \eftec\bladeone\BladeOne(VIEW_DIR,VIEW_CACHE_DIR/*,\eftec\bladeone\BladeOne::MODE_DEBUG*/);
$blade->setOptimize(true);
return $blade->run($name,$args);
}