seeren/controller
Composer 安装命令:
composer require seeren/controller
包简介
Manage action for http message
关键字:
README 文档
README
Manage action for http message
Installation
composer require seeren/controller
Seeren\Controller\JsonController
Retrieve PSR-7 Response for JSON format
use Seeren\Controller\JsonController; $controller = new JsonController(); $response = $controller->render(['foo' => 'bar']);
Seeren\Controller\HTMLController
Retrieve PSR-7 Response for HTML format
use Seeren\Controller\HTMLController; $controller = new HTMLController(); $response = $controller->render('template.html.php', [ 'title' => 'Hello World' ]);
By default, templates folder is in /templates and include path can be specified at construction
project/ └─ templates/
Template use PHP syntax and values are sanitized by default
<h1><?= $title ?></h1>
License
This project is licensed under the MIT License
统计信息
- 总下载量: 282
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-10-17