met_mw / ssystemmessage
简单系统消息库,适用于Web应用程序。
v1.0.0
2016-06-30 09:06 UTC
Requires
- php: >=5.6.0
Requires (Dev)
- phpunit/phpunit: ^5.4
- satooshi/php-coveralls: dev-master
This package is not auto-updated.
Last update: 2024-09-14 19:09:32 UTC
README
SSystemMessage
Web应用程序的简单系统消息。
安装
composer require met_mw/ssystemmessage
示例
系统消息
SystemMessage::i() ->addDanger('Error!') ->addInfo('Information.') ->addSuccess('Success!') ->addWarning('Warning!'); echo '<h1>System messages.</h1>'; SystemMessage::i()->printAll();
使用会话的系统消息
此方法用于在任意页面发送或打印消息。
注意!必须在输出开始之前调用 "SystemMessageSession::i()" 或 "session_start()"。请参阅 session_start() 文档。
SystemMessageSession::i() ->addDanger('Error!') ->addInfo('Information.') ->addSuccess('Success!') ->addWarning('Warning!'); echo '<h1>System messages with using session.</h1>'; SystemMessageSession::i()->printAll();
许可证
met-mw/SSystemMessage 包是开源软件,遵循 MIT 许可证