承接 filisko/debugbar-redbean 相关项目开发

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

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

filisko/debugbar-redbean

最新稳定版本:1.0

Composer 安装命令:

composer require filisko/debugbar-redbean

包简介

RedBeanPHP Collector for Debugbar

README 文档

README

Result

RedBeanPHP collector for Debugbar

Installation and configuration

Install it via composer:

composer require filisko/debugbar-redbean`

To make this work you must enable RedBean's debug mode to log your queries. You can simply use RedBean's Facade debug() method.

How to use

To use this logger with any application, you could basically do something like that:

R::setup('mysql:host=hostname;dbname=db', 'username', 'password');
/*
Possible log modes:
-------------------
0 Log and write to STDOUT classic style (default)
1 Log only, class style
2 Log and write to STDOUT fancy style
3 Log only, fancy style (it works nicely with this one)
*/
R::debug(true, 3);

// ... your queries here ...

// Get RedBean's Logger
$logger = R::getLogger();
$debugbar = new \DebugBar\StandardDebugBar();
$debugbar->addCollector(new \Filisko\DebugBar\DataCollector\RedBeanCollector($logger));

If you realized that RedBean puts at the end of your SQL queries something like '--keep-cache' for internal caching purposes and you want to hide this part from the logger, you could simply use a static flag to disable it:

\Filisko\DebugBar\DataCollector\RedBeanCollector::$showKeepCache = false; // That's all!

Suggestions, ideas, etc.

If you have suggestions, ideas or anything else, just write me an email (filisfutsarov[at]gmail.com) or create an issue in this repository.

统计信息

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

GitHub 信息

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

其他信息

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