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

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

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

chja/cfmessage

最新稳定版本:v1.0

Composer 安装命令:

composer require chja/cfmessage

包简介

Class for flash messages

README 文档

README

Build Status Scrutinizer Code Quality Code Coverage

Module that shows flash messages. It handels messages for success, information and errors for the user.

By Christofer Jadelius

###License

This software is free software and carries a MIT license.

###How to install

First you have to include this code in your composer.json file:

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

###How to use with Anax/MVC

After you have downloaded the package add this code to your front-controller:

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

Note: Before you start adding messages you will have to start a session if you have not done that yet.

Now you can start adding all the messages you want to use. below you can see some examples.

Info messages:

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

Error messages:

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

success messages:

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

warning messages:

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

When a message has been added it will be saved in the session, use these lines to print the message/messages:

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

You can also clear the session by invoking this method:

	$app->Cfmessage->clearSession();

All the messages are using icons from Font Awesome. Font Awesome is not required but the meaning of the messages will be a little bit clearer if you use it.

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固