pmn834/flashmessage
最新稳定版本:v3.0
Composer 安装命令:
composer require pmn834/flashmessage
包简介
Flashmessage for Anax MVC
关键字:
README 文档
README
Flashmessage for Anax MVC
Available at Packagist as flashmessage.
Using CFlashmessage
Copy the file flashmessage.css from the CFlashmessage/css folder to your Anax webroot/css folder. This stylesheet can then be added to your frontcontroller.
$app->theme->addStylesheet("css/flashmessage.css");
Add CFlashmessage as a service.
$di->setShared('flash', function() { $flashmessage = new \pmn834\CFlashmessage\CFlashmessage(); return $flashmessage; });
Start a session before using CFlashmessage.
$app->session();
One or more flashmessages can then be added.
$app->flash->info("Info flash message"); $app->flash->error("Error flash message"); $app->flash->success("Success flash message"); $app->flash->warning("Warning flash message");
To get all flashmessages as HTML use flash->output().
$app->flash->output();
The CFlashmessage/webroot folder includes the frontcontroller flashtest.php to test the CFlashmessage service.
统计信息
- 总下载量: 17
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-04-26