library slim3-mustache
Allows you to use Mustache in Slim 3.
nic-d/slim3-mustache
Allows you to use Mustache in Slim 3.
- Thursday, May 25, 2017
- by __nicd
- Repository
- 1 Watchers
- 1 Stars
- 11 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 1 Versions
- 0 % Grown
Slim 3 Mustache
Adds support for MustachePHP for rendering views in Slim 3., (*1)
Requirements
-
Slim 3.0.0 or newer;
-
PHP 5.6 or newer.
Install
composer require nic-d/slim3-mustache
How to use
// Instantiate Mustache and add to the container
$container['view'] = function ($container) {
$view = new \Slim\Views\Mustache([
'loader' => new Mustache_Loader_StringLoader(),
]);
return $view;
};
You can also fetch the Mustache instance by using:, (*2)
$container->get('view')->getMustache();
Testing
PHPUnit 6.0 or greater required., (*3)
phpunit
dev-master
9999999-dev
Allows you to use Mustache in Slim 3.
Sources
Download
MIT
The Requires
The Development Requires
by
nic