2017 © Pedro Peláez
 

library phptal-view

Render PHPTAL view templates into a PSR-7 Response object.

image

jsangrador/phptal-view

Render PHPTAL view templates into a PSR-7 Response object.

  • Friday, January 22, 2016
  • by jsangrador
  • Repository
  • 0 Watchers
  • 0 Stars
  • 14 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 37 Forks
  • 0 Open issues
  • 14 Versions
  • 0 % Grown

The README.md

PHPTAL Renderer

This is a renderer for rendering PHPTAL view scripts into a PSR-7 Response object. It works well with Slim Framework 3., (*1)

Installation

Install with Composer:, (*2)

composer require jsangrador/PHPTAL-view

Usage With Slim 3

use Slim\Views\PhpTalRenderer;

include "vendor/autoload.php";

$app = new Slim\App();
$container = $app->getContainer();
$container['renderer'] = new PhpTalRenderer("./templates");

$app->get('/hello/{name}', function ($request, $response, $args) {
    return $this->renderer->render($response, "/hello.html", $args);
});

$app->run();

Usage with any PSR-7 Project

//Construct the View
$phpView = new PhpTalRenderer("./path/to/templates");

//Render a Template
$response = $phpView->render(new Response(), "/path/to/template.html", $yourData);

Exceptions

\RuntimeException - if template does not exist, (*3)

\InvalidArgumentException - if $data contains 'template', (*4)

The Versions

22/01 2016

dev-master

9999999-dev

Render PHPTAL view templates into a PSR-7 Response object.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Julio Sangrador-Paton

framework template renderer slim view phptal

22/01 2016

3.0.0

3.0.0.0

Render PHPTAL view templates into a PSR-7 Response object.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Julio Sangrador-Paton

framework template renderer slim view phptal

08/12 2015

2.0.6

2.0.6.0

Render PHP view scripts into a PSR-7 Response object.

  Sources   Download

MIT

The Requires

 

The Development Requires

framework template php renderer slim view phtml

13/11 2015

2.0.5

2.0.5.0

Render PHP view scripts into a PSR-7 Response object.

  Sources   Download

MIT

The Requires

 

The Development Requires

framework template php renderer slim view phtml

11/11 2015

2.0.4

2.0.4.0

Render PHP view scripts into a PSR-7 Response object.

  Sources   Download

MIT

The Requires

 

framework template php renderer slim view phtml

10/11 2015

2.0.3

2.0.3.0

Render PHP view scripts into a PSR-7 Response object.

  Sources   Download

MIT

The Requires

 

framework template php renderer slim view phtml

16/10 2015

2.0.2

2.0.2.0

Render PHP view scripts into a PSR-7 Response object.

  Sources   Download

MIT

The Requires

 

framework template php renderer slim view phtml

01/10 2015

2.0.1

2.0.1.0

  Sources   Download

MIT

The Requires

 

01/10 2015

2.0.0

2.0.0.0

  Sources   Download

MIT

The Requires

 

01/10 2015

2.0.0-RC1

2.0.0.0-RC1

  Sources   Download

MIT

The Requires

 

29/09 2015

1.0.3

1.0.3.0

  Sources   Download

MIT

The Requires

 

29/09 2015

1.0.2

1.0.2.0

  Sources   Download

MIT

The Requires

 

29/09 2015

1.0.1

1.0.1.0

  Sources   Download

MIT

The Requires

 

29/09 2015

1

1.0.0.0

  Sources   Download

MIT

The Requires