dearon / slim-mustache
Mustache View Parser package for the Slim Framework
Installs: 4 739
Dependents: 2
Suggesters: 0
Security: 0
Stars: 13
Watchers: 3
Forks: 4
Open Issues: 0
Requires
- php: >=5.3.0
- mustache/mustache: >=2.5.1
- slim/slim: >=2.4.0
This package is not auto-updated.
Last update: 2024-10-26 14:53:12 UTC
README
This repository contains a custom View class for Mustache.php. You can use the custom View class by either requiring the appropriate class in your Slim Framework bootstrap file and initialize your Slim application using an instance of the selected View class or using Composer (the recommended way).
How to Install
using Composer
Create a composer.json file in your project root:
{ "require": { "dearon/slim-mustache": "0.1.*" } }
Then run the following composer command:
$ php composer.phar install
How to use
<?php require 'vendor/autoload.php'; $app = new \Slim\Slim(array( 'view' => new \Slim\Mustache\Mustache() ));
To use Mustache options do the following:
$view = $app->view(); $view->parserOptions = array( 'charset' => 'ISO-8859-1' );
Authors
License
MIT Public License