mpalourdio/mpa-firephp-wrapper

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: 2024-12-21 15:49:48 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