sh/flash 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sh/flash

最新稳定版本:v1.0

Composer 安装命令:

composer require sh/flash

包简介

Plugin to display flash messages.

README 文档

README

Build Status Scrutinizer Code Quality Code Coverage

FlashMessage

This module is used to display flash messages in your project.

To use this module the following code needs be added in the frotcontroller.

$di->setShared('flash', function() {
    $flash = new \Anax\FlashMessage\FlashMessage();
    return $flash;
});

If you want to keep the code consistent it also can be added in the CDIFactoryDefault that is located in src/DI. It should be added like this.

$this->setShared('flash', function() {
    $flash = new \Anax\FlashMessage\FlashMessage();
    return $flash;
});

To use the the flash messages add the following line to your project.

  $app->flash->message('information', 'This is a info message');
  $app->flash->message('warning', 'This is a warning message');
  $app->flash->message('success', 'This is a success message');
  $app->flash->message('error', 'This is a error message');

This will generate HTML-code that will be displayed in the view.

The style of the flash messages can be changed in the flash.css file.

统计信息

  • 总下载量: 13
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-04-09