📜 ⬆️ ⬇️

ZFDebug

ZFDebug is a plugin for the Zend Framework. It contains useful debug information in a small panel at the bottom of each page. Before version 1.5, it was called Scienta ZF Debug Bar.

image

Time, memory and the number of queries to the database are visible at a glance. In addition, there is information about the processed (included) files, the list of available template variables (view) and SQL queries are displayed in a separate panel (in the figure, the database is configured with 2 adapters).

Existing plugins


Installation and use


Place the ZFDebug directory in the directory specified in the include_path. Then add the following method to load your class (ZF 1.8 +):
')
protected function _initZFDebug()
{
$autoloader = Zend_Loader_Autoloader::getInstance();
$autoloader->registerNamespace( 'ZFDebug' );

$options = array(
'plugins' => array( 'Variables' ,
'Database' => array( 'adapter' => $db),
'File' => array( 'basePath' => '/path/to/project' ),
'Memory' ,
'Time' ,
'Registry' ,
'Cache' => array( 'backend' => $cache->getBackend()),
'Exception' )
);
$debug = new ZFDebug_Controller_Plugin_Debug($options);

$ this ->bootstrap( 'frontController' );
$frontController = $ this ->getResource( 'frontController' );
$frontController->registerPlugin($debug);
}

* This source code was highlighted with Source Code Highlighter .


Learn more at the project page: zfdebug.googlecode.com

Source: https://habr.com/ru/post/62023/


All Articles