1.1. Introduction

1.1.1. Installation

Qiq is installable via Composer as qiq/qiq:

composer require qiq/qiq ^1.0

1.1.2. Getting Started

First, a template file, saved at /path/to/templates/hello.php:

Hello, {{h $this->name }}. That was Qiq!

And this is PHP, <?= $this->h($this->name) ?>.

Next, the presentation code, to generate output using the hello template:

use Qiq\Template;

$tpl = Template::new('/path/to/templates');
$tpl->setView('hello');
$tpl->setData([
    'name' => 'World'
]);
echo $tpl->render();

That's all there is to it.