2017 © Pedro Peláez
 

package debugbar-redbean

RedBeanPHP Collector for Debugbar

image

filisko/debugbar-redbean

RedBeanPHP Collector for Debugbar

  • Monday, March 5, 2018
  • by Filisko
  • Repository
  • 1 Watchers
  • 2 Stars
  • 570 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 13 % Grown

The README.md

RedBeanPHP collector for Debugbar

Result

RedBeanPHP collector for Debugbar, (*1)

Installation and configuration

Install it via composer:, (*2)

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., (*3)

How to use

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

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:, (*5)

\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., (*6)

The Versions

05/03 2018

dev-master

9999999-dev

RedBeanPHP Collector for Debugbar

  Sources   Download

MIT

The Requires

 

by Avatar Filisko

collector debugbar redbean

27/08 2016

1.0

1.0.0.0

RedBeanPHP Collector for Debugbar

  Sources   Download

MIT

The Requires

 

by Avatar Filisko

collector debugbar redbean