2017 © Pedro Peláez
 

library phalcon3-debug-widget

Phalcon debug toolbar for Phalcon 3

image

c0de8/phalcon3-debug-widget

Phalcon debug toolbar for Phalcon 3

  • Monday, January 30, 2017
  • by C0DE8
  • Repository
  • 0 Watchers
  • 1 Stars
  • 66 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 3 Versions
  • 6 % Grown

The README.md

Phalcon Debug Widget (PDW) for Phalcon 3

Latest Stable Version Total Downloads, (*1)

License, (*2)

1) Forked from [Zazza/phalcon-debug-widget] (https://github.com/Zazza/phalcon-debug-widget), (*3)

2) Update from https://github.com/C0DE8/phalcon3-debug-widget, (*4)

Changelog:

  • no necessary assets (all images, CSS and JS Code is minified and inline)
  • no jquery dependence (jQuery is executed with "noConflict")
  • the sections: Server, Views, Database hide and show by click

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, (*5)

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., (*6)

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., (*7)

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

Installation

composer.json:, (*9)

"c0de8/phalcon3-debug-widget": "dev-master"

composer require (command line):, (*10)

composer require c0de8/phalcon3-debug-widget:dev-master

Usage and Configuration

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

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

After you have setup your \Phalcon\Loader and \Phalcon\DI\FactoryDefault() create a new instance of the debug widget inside your "index.php", where application is started., (*12)

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

Preview

, (*13)

Attribution:

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

The Versions

30/01 2017

dev-master

9999999-dev https://github.com/c0de8/phalcon3-debug-widget

Phalcon debug toolbar for Phalcon 3

  Sources   Download

GPL-3.0+

The Requires

  • php >=5.4.0
  • ext-phalcon >= 3.0.0

 

debug widget phalcon toolbar

23/01 2017

0.1.1

0.1.1.0

Phalcon debug toolbar for Phalcon 3

  Sources   Download

GPL-3.0+

The Requires

  • php >=5.4.0
  • ext-phalcon >= 3.0.0

 

11/12 2016

0.1.0

0.1.0.0

Phalcon debug toolbar for Phalcon 3

  Sources   Download

GPL-3.0+

The Requires

  • php >=5.4.0
  • ext-phalcon >= 3.0.0