mpalourdio / mpa-firephp-wrapper
Lightweight ZF2 module that wraps firephp. Provides a view helper and a controller plugin. Easily configurable and usable
Requires
- php: >=5.5
- firephp/firephp-core: ~0.4
- zendframework/zend-modulemanager: ~2.3
- zendframework/zend-mvc: ~2.3
- zendframework/zend-servicemanager: ~2.3
- zendframework/zend-stdlib: ~2.3
- zendframework/zend-view: ~2.3
Requires (Dev)
Suggests
- zendframework/zend-developer-tools: zend-developer-tools if you want to profile firephp logging
This package is not auto-updated.
Last update: 2024-12-21 15:49:48 UTC
README
MpaFirephpWrapper
Lightweight ZF2 module that wraps firephp. Provides a view helper and a controller plugin. Easily configurable and usable.
Requirements
PHP 7.0+
Configuration
Copy mpafirephpwrapper.config.global.php.dist in your autoload folder and rename it by removing the .dist extension.
Installation
Run the command below to install via Composer
composer require mpalourdio/mpa-firephp-wrapper
Add "MpaFirephpWrapper" to your modules list in application.config.php
Usage (in a controller action or in a view script)
$this->firephp($mythingtolog);
The default behavior is set to bind the info() method of FirePHP. You can override this by doing
$this->firephp($mythingtolog, 'warn'); // the different possibilites are log/info/warn/error
Warning
Deep objects can freeze the plugin. You can set your own depth options in mpafirephpwrapper.config.global.php. The default ones are :
$options = [ 'maxObjectDepth' => 3, 'maxArrayDepth' => 3, 'maxDepth' => 3, 'useNativeJsonEncode' => true, 'includeLineNumbers' => true ];
ZDT integration
The Zend Developer Tools toolbar will show you how many events are logged to Firephp