2017 © Pedro Peláez
 

library tools

LeonardoCA tools for nette debugging

image

leonardoca/tools

LeonardoCA tools for nette debugging

  • Thursday, March 3, 2016
  • by LeonardoCA
  • Repository
  • 1 Watchers
  • 1 Stars
  • 161 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

LeonardoCA/Tools Build Status

Various tools for debugging nette applications:, (*1)

  • SmartDump
  • htmlDump
  • ProcessMonitor
  • DumpMailer

Installation

The best way to install LeonardoCA/Tools is using Composer:, (*2)

composer require leonardoca/tools:@dev

Configure extension in config.ini

extensions:
    smartDump: LeonardoCA\Tools\DI\SmartDumpExtension
smartDump:
    traceMode: 2  #false|number|all

Usage

Fast smart dump to Tracy Bar Panel

    SmartDump::dump($variable);

    // shortcut
    sdump($variable);

    // add own html block to dump panel

    SmartDump::addToDumpPanel(
        '
        <table>
            <tr><th>A</th><th>B</th><th>C</th><th>D</th></tr>
            <tr><td>1</td><td>2</td><td>3</td><td>4</td></tr>
        </table>
        ',
        'custom info'
    );

    // catching output buffering to dumps panel

    bs();
    echo "some output to browser";
    be('catch output buffering');

    // tidy formatted output

    $someXML =
        '<?xml version="1.0" encoding="utf-8"?><something>jjj</something>
<otherwise><x1>88</x1><x2>44</x2></otherwise>';

    sdump(tidyFormatXML($someXML));

    SmartDump::addToDumpPanel(
        '<pre>' . htmlspecialchars(tidyFormatXML($someXML)) . '</pre>',
        "some XML"
    );

    // dumpHtml for fast debugging of html markup of Nette\Utils\Html or whole Controls

    $someHtmlObject =
        Nette\Utils\Html::el('a')->addClass('btn btn-danger')->setTitle(
            'Danger'
        )->setHtml('danger');

    dumpHtml($someHtmlObject);

The Versions

03/03 2016

dev-master

9999999-dev https://github.com/LeonardoCA/Tools

LeonardoCA tools for nette debugging

  Sources   Download

GPL-3.0 BSD-3-Clause GPL-2.0

The Requires

 

The Development Requires

nette tools debugging leonardoca