コード例 #1
0
ファイル: index.php プロジェクト: requtize/atline
<?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
ファイル: index.php プロジェクト: requtize/atline
<?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
ファイル: index.php プロジェクト: requtize/atline
<?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>']);