Пример #1
0
<?php

include '../load.php';
use Requtize\Atline\Engine;
use Requtize\Atline\Environment;
$engine = new Engine(__DIR__ . '/runtime/Cache', new Environment());
$engine->setCached(false);
$engine->setDefinitionResolver(new MyDefinitionResolver());
$engine->setDefaultExtends('base');
$engine->setDefaultData(['globalData' => ['global' => 'data', 'array' => '$engine']]);
echo $engine->render('index', ['viewData' => ['view' => 'data', 'array' => 'render']]);
Пример #2
0
<?php

include '../load.php';
use Requtize\Atline\Engine;
use Requtize\Atline\Environment;
$engine = new Engine(__DIR__ . '/runtime/Cache', new Environment());
$engine->setCached(false);
$engine->setDefinitionResolver(new MyDefinitionResolver());
$engine->setDefaultExtends('base');
echo $engine->render('index');
Пример #3
0
<?php

include '../load.php';
include 'MyEnvironment.php';
use Requtize\Atline\Engine;
use Requtize\Atline\Environment;
$engine = new Engine(__DIR__ . '/runtime/Cache', new MyEnvironment());
$engine->setCached(false);
$engine->setDefinitionResolver(new MyDefinitionResolver());
$engine->setDefaultExtends('base');
echo $engine->render('index', ['data' => '<p>This is <span style="color:red">collored</span>, <strong>stronged</strong> and <sup>sup</sup> text in paragraph.</p>']);