承接 monolyth/booby 相关项目开发

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

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

monolyth/booby

Composer 安装命令:

composer require monolyth/booby

包简介

Flash message storage system for Monolyth unframework

README 文档

README

Generic flash message storage system

"Flash messages" are those one-off messages a web application might want to show to a User, e.g. "Changes saved successfully". The developer wants to add these messages and be ensured they get shown exactly once, whenever (between page loads, after redirect, on the desktop when generated in an Ajax request etc.).

Installation

Composer (recommended)

$ composer require monolyth/booby

Manual

  1. Clone or download the repository;
  2. Add /path/to/booby/src for namespace Monolyth\Booby in your autoloader.

Usage

Adding a message is simple:

<?php

Monolyth\Booby\Flash::me('This is my awesome message.');

...as is later displaying it:

<?php

foreach (Monolyth\Booby\Flash::each() as $msg) {
    echo $msg;
}

Adding options to messages

You can pass an optional second parameter to Flash::me containing a hash of key/value pairs available as options on your message. E.g.:

<?php

Monolyth\Booby\Flash::me('This is a warning', ['type' => 'warning']);

$msg = Monolyth\Booby\Flash::each();
echo $msg->type; // "warning"

These options can be anything as long as the key is a valid PHP property name.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-07-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固