2017 © Pedro Peláez
 

library glue-twig

Use twig templating engine in Glue

image

gluephp/glue-twig

Use twig templating engine in Glue

  • Friday, May 6, 2016
  • by gluephp
  • Repository
  • 1 Watchers
  • 1 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Twig for Glue

Use twig/twig with gluephp/glue, (*1)

Installation

Use Composer:, (*2)

$ composer require gluephp/glue-twig

Configure Twig

$app = new Glue\App;

$app->config->override([
    'twig' => [
        'path'    => '/absolute/path/to/templates/folder',
        'config'  => [
            // Additional Twig config, read Twigs 
            // documentation for more info...
        ]
    ],
]);

Register Twig

$app->register(
    new Glue\Twig\ServiceProvider()
);

Get the Twig instance

Once the service provider is registered, you can fetch the Twig instance with:, (*3)

$twig = $app->make('Twig_Environment');

or use the alias:, (*4)

$twig = $app->twig;

The Versions

06/05 2016

dev-master

9999999-dev

Use twig templating engine in Glue

  Sources   Download

MIT

The Requires

 

by Magnus Eriksson

06/05 2016

dev-develop

dev-develop

Use twig templating engine in Glue

  Sources   Download

MIT

The Requires

 

by Magnus Eriksson

06/05 2016

0.1.0

0.1.0.0

Use twig templating engine in Glue

  Sources   Download

MIT

The Requires

 

by Magnus Eriksson