承接 martynbiz/php-flash-message 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

martynbiz/php-flash-message

Composer 安装命令:

composer require martynbiz/php-flash-message

包简介

Flash messenger that will keep messages until they are "flushed" - current or persistant states.

README 文档

README

Flash messenger that will keep messages until they are "flushed" - current or persistant states.

Installation

Composer

"require-dev": {
    "martynbiz/php-flash-message": "dev-master"
}

Usage

Add message

$flash = new \MartynBiz\FlashMessage\Flash;
$flash->addMessage('success', 'You have successfully registered');

Check if message exists by key

$flash->has('success'); // true
$flash->has('errors'); // false

Flush messages

This method can be called during the same HTTP request or future request. This means it is useful when redirecting but also forwarding to, for example, another controller action. The contents of the container will be emptied when this method is called once.

$messages = $flash->flushMessages();

Using custom storage

It is possible to use your own storage object, as long as it implements ArrayAccess interface. Below Zend\Storage\Container has been used:

$container = new Zend\Session\Container('mycontainer');
$flash = new Flash($container);

TODO

  • create a simple session storage as default

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-01-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固