Skip to content
jymboche edited this page Feb 1, 2014 · 4 revisions

Installation and Configuration

Copy the main PDW folder into your project where you keep third-party libraries. For example (app/library or app/vendor or /vendor).

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:

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

After you have setup your \Phalcon\Loader and \Phalcon\DI\FactoryDefault() create a new instance of the debug widget. Here we will tell phalcon about the PDW namespace and instantiate the widget with the $di. (Assuming $di is your dependency injector and $loader is your \Phalcon\Loader)

if (PHALCONDEBUG == true) {
	$namespaces = array_merge($loader->getNamespaces(), array('PDW'=>realpath('/path/to/PDW')));
	$loader->registerNamespaces($namespaces);
	$debugWidget = new \PDW\DebugWidget($di);
}

Finally, copy or move the pdw-assets folder to your public folder.

Clone this wiki locally