slim/plates
Composer 安装命令:
composer require slim/plates
包简介
Plates View (native php) package for the Slim Framework
README 文档
README
PHP Slim View for PHP Plates.
- Uses the templates path variable from Slim.
- You can use the same functions as defined in package slim/views.
Example
<?php /** * @var Composer\Autoload\ClassLoader $autoload */ $autoload = require 'vendor/autoload.php'; $app = new Slim\Slim(); $app->view( new Slim\Views\Plates(function (League\Plates\Engine $engine) use ($app) { $engine->loadExtension(new League\Plates\Extension\URI($app->request()->getPathInfo())); $engine->loadExtension(new Slim\Views\PlatesExtension); }) ); // routes... $app->run();
installation
version 1.0 requires plates 3.0. If you need to use 2.x, use 0.2. When installing, use * to determine which version to use.
via composer.json:
{
"require": {
"slim/plates": "*"
}
}
and then
composer install
or
composer update -o
via command line
composer require slim/plates
统计信息
- 总下载量: 1.92k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-08-29