2017 © Pedro Peláez
 

library hubert-template

Hubert extension for templating

image

falkm/hubert-template

Hubert extension for templating

  • Saturday, December 17, 2016
  • by falkmueller
  • Repository
  • 1 Watchers
  • 0 Stars
  • 51 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 2 % Grown

The README.md

Hubert Template Extension

Installation

Hubert is available via Composer:, (*1)

{
    "require": {
        "falkm/hubert-template": "1.*"
    }
}

Usage

Create an index.php file with the following contents:, (*2)

<?php

require 'vendor/autoload.php';

$app = new hubert\app();

$config = array(
    "factories" => array(
         "template" => array(hubert\extension\template\factory::class, 'get')
        ),
    "config" => array(
        "display_errors" => true,
        "template" => array(
               "path" => __dir__.'/templates',
               "fileExtension" => "phtml",
               "extensions" => array(
                   hubert\extension\template\urlExtension::class
               )
            )
        ),
    "routes" => array(
        "home" => array(
            "route" => "/", 
            "method" => "GET|POST", 
            "target" => function($request, $response, $args){
                $html = hubert()->template->render("index", array("name" => "hubert"));
                $response->getBody()->write($html);
                return $response;
            }
        ),
);

hubert($config);
hubert()->core()->run();

For more see the example in this repository., (*3)

components

License

The MIT License (MIT). Please see License File for more information., (*4)

The Versions

17/12 2016

dev-master

9999999-dev http://falk-m.de/

Hubert extension for templating

  Sources   Download

MIT

The Requires

 

The Development Requires

by Falk Müller

framework php

16/11 2016

1.1.1

1.1.1.0 http://falk-m.de/

Hubert extension for templating

  Sources   Download

MIT

The Requires

 

The Development Requires

by Falk Müller

framework php

14/11 2016

1.1.0

1.1.0.0 http://falk-m.de/

Hubert extension for templating

  Sources   Download

MIT

The Requires

 

The Development Requires

by Falk Müller

framework php

11/11 2016

1.0.1

1.0.1.0 http://falk-m.de/

Hubert extension for templating

  Sources   Download

MIT

The Requires

 

The Development Requires

by Falk Müller

framework php

03/11 2016

1.0.0

1.0.0.0 http://falk-m.de/

Hubert extension for templating

  Sources   Download

MIT

The Requires

 

The Development Requires

by Falk Müller

framework php