ZFDebug
ZFDebug is a plugin for the Zend Framework. It contains useful debugging information in a small panel at the bottom of each page. Up to version 1.5 was called Scienta ZF Debug Bar.
Time, memory and the number of queries to the database are visible at first sight. In addition, there is information about the processed (included) files, the list of available variables, templates (view) and SQL queries are displayed in separate panels (in the image database is configured with 2 adapters).
Place the ZFDebug directory in the directory specified in the include_path. Then add the following method to load your class (ZF 1.8 +):
More information can be found on the project page: zfdebug.googlecode.com
Article based on information from habrahabr.ru
Time, memory and the number of queries to the database are visible at first sight. In addition, there is information about the processed (included) files, the list of available variables, templates (view) and SQL queries are displayed in separate panels (in the image database is configured with 2 adapters).
Existing plugins
-
the
- Cache: Information on Zend_Cache and APC. the
- Database: a Full listing of SQL queries and the time for each of them. the
- Exception: Information about errors and exceptions. the
- File: the number and size of files processed by PHP. the
- HTML: the Number of external styles and javascripts. Link to confirm with the W3C. the
- Memory: the Maximum size of memory used, memory used in the controller of identities and support custom measurements, pamati. the
- Registry: Contents of Zend_Registry the
- Time: lead Time tequiero query, the execution time of the action in the controller and custom timers. In addition, average, minimum, and maximum time for queries. the
- Variables: List of variable templates, data query, and the contents of $ _COOKIE, and $ _POST
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 _initZFDebug function()
{
$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.
More information can be found on the project page: zfdebug.googlecode.com
Комментарии
Отправить комментарий