tomas/message 问题修复 & 功能扩展

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

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

tomas/message

Composer 安装命令:

composer require tomas/message

包简介

Message handling plugin

README 文档

README

Build Status Scrutinizer Code Quality Code Coverage

This is a simple Message plugin that will store message via Session and display it for a given interval. Support for several message bubbles.

  1. Include
  • message.js
  • message.css
  • Message.php
    • Include the file wherever you may want to start a message and also where you want to output message.

##Simple SET and GET

  1. setMessage(your message)
  • accepts array only
  • ['type', 'msg']
    • Type either "ok" or "error"
    • Msg the wanted message to display
  1. getMessage() *outputs the message

##Use with Anax-MVC

  1. Js and Css files
  • message.js
    • put into webroot/js
    • include that JS-file in your Theme
  • message.css
    • put into webroot/css
    • include that CSS-file in your Theme
  1. PHP file
  • Change Namespace in Message.php file
  • Load Message.php in CDIFactory
  • Create custom CDIFactory
<?php

namespace -Your namespace-

use Anax\DI\CDIFactoryDefault;
use tomas\Message\Message;

class CDIFactory extends CDIFactoryDefault
{
    public function __construct()
    {
        parent::__construct();

        $this->set('message', function() {
            $message = new Message();
            return $message;
        });
    }
}
?>
  1. Change file "config_with_app.php"
  • Change to CDIFactory instead of default
  • Add $app->session();
  1. index.php (or choosen router)
  • furthest down, under "$app->theme->render();" add "$app->message->getMessage()"

Drop me a mail tomas.sjosten@gmail.com if you want to give me some feedback.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-02-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固