承接 nuvalis/mzflash 相关项目开发

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

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

nuvalis/mzflash

Composer 安装命令:

composer require nuvalis/mzflash

包简介

Session based flash message class. Written for Anax-MVC part of the dbwebb course.

README 文档

README

Build Status

A PHP Flash Message Class

Installation Instructions for Anax-MVC

Register it as an Anax Service like this in your config/frontcontroller or whatever method you prefer.

$di = new \Anax\DI\CDIFactoryDefault();

// Other Services

$di->setShared('mzflash', function() {
	$mzflash = new \nuvalis\Flash\Message();
	return $mzflash;
});

// Other Services, Controllers etc.

$app = new \Anax\Kernel\CAnax($di);

$app->session //Start Session for mzFlash to work.

You should now be able to use these functions like this.

// In the Frontcontroller you can do it like this.

$app->mzflash->error("Your Message");
$app->mzflash->success("Your Message");
$app->mzflash->warning("Your Message");
$app->mzflash->message("Your Message");

// If you are in a Controller or Model (Notice the diffrence $app/$this)

$this->mzflash->error("Your Message");
$this->mzflash->success("Your Message");
$this->mzflash->warning("Your Message");
$this->mzflash->message("Your Message");

//To print it out you can use it like this in your Anax-MVC/theme/mytheme/index.tpl.php

<?= $this->mzflash->show(); ?>

// The Output will look something like this

<section class="flash-messages">
	<div class="inner">
		<div class="flash error">Your Message</div>
		<div class="flash success">Your Message</div>
		<div class="flash warning">Your Message</div>
		<div class="flash message">Your Message</div>
	</div>
</section>

Update

[14 May, 2014] Changed variable from flash to mzflash to avoid collision with Anax-MVC's new flash class/service. You can name this service to anything you want.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-04-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固