flextype-components/view
Composer 安装命令:
composer require flextype-components/view
包简介
View Component provides basic methods for displaying PHP views.
README 文档
README
View Component provides basic methods for displaying PHP views.
Installation
composer require flextype-components/View
Usage
use Flextype\Component\View\View;
Create a new view object and render it.
// Create new view object $view = new View('blog/views/backend/index'); // Assign some new variables $view->assign('msg', 'Some message...'); // Get view $output = $view->render(); // Display view echo $output;
View factory
Create new view object, assign some variables
and displays the rendered view in the browser.
View::factory('blog/views/backend/index') ->assign('msg', 'Some message...') ->display();
Include the view file and extracts the view variables before returning the generated output.
// Get view $output = $view->render(); // Display output echo $output;
Displays the rendered view in the browser.
$view->display();
License
See LICENSE
统计信息
- 总下载量: 816
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-04-25