mpalourdio/mpa-firephp-wrapper

This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

Lightweight ZF2 module that wraps firephp. Provides a view helper and a controller plugin. Easily configurable and usable

0.3.1 2015-03-02 14:21 UTC

This package is not auto-updated.

Last update: 2021-10-16 00:44:17 UTC


README

Build Status Scrutinizer Code Quality Code Coverage SensioLabsInsight PHP 7.0+ MIT Licensed

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