2017 © Pedro Peláez
 

library phalcon-debug-widget

Very simple to install Debug Toolbar Widget for Phalcon framework.

image

transactpro/phalcon-debug-widget

Very simple to install Debug Toolbar Widget for Phalcon framework.

  • Thursday, June 9, 2016
  • by uLow
  • Repository
  • 3 Watchers
  • 2 Stars
  • 3,969 Installations
  • HTML
  • 0 Dependents
  • 0 Suggesters
  • 31 Forks
  • 0 Open issues
  • 7 Versions
  • 2 % Grown

The README.md

Phalcon Debug Widget

SensioLabsInsight, (*1)

Latest Stable Version Total Downloads, (*2)

Note (How it works):

The debug widget for now is very simplistic and more of a proof-of-concept. It expects you have three services in your dependency injector named "db", "dispatcher" and "view" and that they correspond to those services. When you pass the DI to Phalcon Debug Widget It looks for those specific services and: - sets them as shared services - sets the eventManager for them - Attaches itself to those events, (*3)

This means passing the DI to the debug widget will alter those services. Generally speaking, a shared db, dispatcher, and view is fine. If you have ideas for other ways to hook in, please open an issue for discussion., (*4)

The Phalcon Debug Widget is designed to make development easier by displaying debugging information directly in your browser window. Currently it displays php globals such as $_SESSION as well as outputing resource usage and database queries and connection information. It includes syntax highlighting via Prismjs.com., (*5)

If it looks familiar, its because its modeled after the Yii debug toolbar, (*6)

Installation

"require": {
    "transactpro/phalcon-debug-widget": "~1.0"
}

Usage and Configuration

Define a debug or environment flag in your main index.php (or config.php) file so you can easily disable the Phalcon Debug Widget on production environments. Example:, (*7)

defined('PHALCONDEBUG') || define('PHALCONDEBUG', true);

Add these lines to your index.php file before you handle application., (*8)

if (PHALCONDEBUG) {
    $debugWidget = new \PDW\DebugWidget($di);
}

echo $application->handle()->getContent();

Or you can specify your custom list of providers and panels:, (*9)

if (PHALCONDEBUG) {
    $debugWidget = new \PDW\DebugWidget($di, [
        'db'          => ['db'],
        'dispatch'    => ['dispatcher'],
        'view'        => ['view'],
        'apiProvider' => ['apiProvider']
    ], [
        'server',
        'request',
        'views',
        'db',
        'api'
    ]);
}

echo $application->handle()->getContent();

Preview

Server

, (*10)

Request

, (*11)

Views

, (*12)

Database

, (*13)

Api calls

Attribution:

Bug Icon designed by Nithin Viswanathan from the Noun Project, (*14)

JQuery Syntax Highlighting implemented with Prismjs.com, (*15)

The Versions

09/06 2016

dev-master

9999999-dev

Very simple to install Debug Toolbar Widget for Phalcon framework.

  Sources   Download

MIT

by Vitalijs Litvinovs

09/12 2015

1.0.4

1.0.4.0

Very simple to install Debug Toolbar Widget for Phalcon framework.

  Sources   Download

by Vitalijs Litvinovs

17/07 2015

1.0.2a

1.0.2.0-alpha

Very simple to install Debug Toolbar Widget for Phalcon framework.

  Sources   Download

by Vitalijs Litvinovs

17/07 2015

1.0.3

1.0.3.0

Very simple to install Debug Toolbar Widget for Phalcon framework.

  Sources   Download

by Vitalijs Litvinovs

16/07 2015

1.0.2

1.0.2.0

Very simple to install Debug Toolbar Widget for Phalcon framework.

  Sources   Download

by Vitalijs Litvinovs

09/07 2015

1.0.1

1.0.1.0

Very simple to install Debug Toolbar Widget for Phalcon framework.

  Sources   Download

by Vitalijs Litvinovs

09/07 2015

1.0.0

1.0.0.0

Very simple to install Debug Toolbar Widget for Phalcon framework.

  Sources   Download

by Vitalijs Litvinovs