reinvanoyen/oak-aegis

There is no license information available for the latest version (0.0.5) of this package.

Aegis bindings for Oak

0.0.5 2020-04-22 14:00 UTC

This package is auto-updated.

Last update: 2024-04-22 22:39:57 UTC


README

Aegis bindings for Oak

Config options

Name Default
template_directory templates
cache_directory cache/templates
nodes [PrintNode::class, IfNode::class, AssignmentNode::class, ForNode::class, ExtendNode::class, BlockNode::class, IncludeNode::class, RawNode::class, PhpNode::class, PropNode::class]
custom_nodes []

Basic example

<?php

$app = new \Oak\Application();

// Register service provider
$app->register([

  // Oak
  \Oak\Config\ConfigServiceProvider::class,
  \Oak\Console\ConsoleServiceProvider::class,
  \Oak\Filesystem\FilesystemServiceProvider::class,
  
  // Packages
  \ReinVanOyen\OakAegis\AegisServiceProvider::class,
]);

$app->bootstrap();

// Start using Aegis
$template = $app->get(Template::class);
$template->set('title', 'Aegis');
echo $template->render('index');