Skip to content

Commit 54d1b23

Browse files
committed
Update README.markdown
1 parent aaab6b7 commit 54d1b23

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

README.markdown

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@ If it looks familiar, its because its modeled after the [Yii debug toolbar](http
1818

1919
## Installation
2020

21-
Copy the main PDW folder into your project where you keep third-party libraries.
22-
For example (app/library or app/vendor or /vendor). Copy or move the pdw-assets folder to your public folder.
21+
```json
22+
"require": {
23+
"transactpro/phalcon-debug-widget": "~1.0"
24+
}
25+
```
2326

2427
## Usage and Configuration
2528

@@ -31,13 +34,13 @@ Define a debug or environment flag in your main index.php file so you can easily
3134
defined('PHALCONDEBUG') || define('PHALCONDEBUG', true);
3235
```
3336

34-
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)
37+
Add these lines to your index.php file before you handle application.
3538
```php
36-
if (PHALCONDEBUG == true) {
37-
$namespaces = array_merge($loader->getNamespaces(), array('PDW'=>realpath('/path/to/PDW')));
38-
$loader->registerNamespaces($namespaces);
39+
if (PHALCONDEBUG) {
3940
$debugWidget = new \PDW\DebugWidget($di);
4041
}
42+
43+
echo $application->handle()->getContent();
4144
```
4245

4346

0 commit comments

Comments
 (0)