erogami/cfmessage 问题修复 & 功能扩展

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

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

erogami/cfmessage

Composer 安装命令:

composer require erogami/cfmessage

包简介

Class for flash messages

README 文档

README

Build Status Scrutinizer Code Quality Code Coverage

Cfmessage

Flash messages, a class to show sucess, info, warning and error messages for the user.

By Alex Chau, alex_chau6@hotmail.com

Instructions

###1. Download

First of all install by using composer. Add this code to your composer.json:

"require": {
    "erogami/cfmessage": "dev-master"
},

###2. Include Cfmessage in your framework

Add this code to your front-controller.

$di->set('Cfmessage', function() use ($di) { 
    $message = new \erogami\Cfmessage\Cfmessage($di);  
    return $message; 
}); 

Now add these lines to get your message.

For info messages:

    $app->Cfmessage->addInfo('This is an information message'); 

For error messages:

    $app->Cfmessage->addError('This is an error message'); 

For warning messages:

    $app->Cfmessage->addWarning('This is a warning message'); 

For success messages:

    $app->Cfmessage->addSuccess('This is a success message'); 

The messages will be saved in the session, call these lines to print out the messages:

    $messages = $app->Cfmessage->printMessage();
    $app->views->addString($messages);

The class uses Font Awesome, but works without it too. So it's optional wheter you want to include the icons or not.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-01-13