2017 © Pedro Peláez
 

library phrender

Simple PHP Renderer

image

dlundgren/phrender

Simple PHP Renderer

  • Sunday, July 1, 2018
  • by dlundgren
  • Repository
  • 1 Watchers
  • 0 Stars
  • 13 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 44 % Grown

The README.md

Phrender

Travis CI Code Climate, (*1)

Phrender is a simplistic PHP renderer that provides a no frills rendering engine., (*2)

PSR-1 and PSR-4 compliant., (*3)

This uses the Output Interop specification., (*4)

Contexts

The following contexts are provided for use:, (*5)

  • Collection Any number of the following
  • Any Matches any template
  • Contains uses stripos to match the template
  • Match Uses a regex to match the template
  • Only Will match only the specified template

Installation

Phrender can be installed using composer, (*6)

composer require dlundgren/phrender, (*7)

Basic Usage

var ?>

// output = "something"
$output = $engine->render('index', ['var' => 'something']); 

// Alternate
// output = ""
$ctxt   = new Phrender\Context\Contains('something', ['var' => 'display']);
$output = $engine->render('index', $ctxt); 

Different extension

You may use an alternate extension for the templates with the Template Factory constructor second argument., (*8)

$factory = new Phrender\Template\Factory(['/path/to/views'], 'phtml');
$engine = new Phrender\Engine($factory, new Phrender\Context\Collection());

// index.phtml: = $this->var ?>

// output = "something"
$output = $engine->render('index', ['var' => 'something']);

The Versions

01/07 2018

dev-master

9999999-dev

Simple PHP Renderer

  Sources   Download

MIT

The Requires

 

The Development Requires

01/07 2018

0.1.3

0.1.3.0

Simple PHP Renderer

  Sources   Download

MIT

The Requires

 

The Development Requires

29/06 2018

0.1.2

0.1.2.0

Simple PHP Renderer

  Sources   Download

MIT

The Requires

 

The Development Requires

07/01 2018

0.1.1

0.1.1.0

Simple PHP Renderer

  Sources   Download

MIT

The Requires

 

The Development Requires

28/02 2017

0.1.0

0.1.0.0

Simple PHP Renderer

  Sources   Download

MIT

The Requires

 

The Development Requires