@@ -38,11 +38,13 @@ examples and [phpdebugbar.com](http://phpdebugbar.com) for a live example.
3838The best way to install DebugBar is using [ Composer] ( http://getcomposer.org )
3939with the following requirement:
4040
41- {
42- "require": {
43- "maximebf/debugbar ": ">=1.0.0"
44- }
41+ ``` JSON
42+ {
43+ "require " : {
44+ "maximebf/debugbar" : " >=1.0.0 "
4545 }
46+ }
47+ ```
4648
4749If you are cloning the repository, you'll need to run ` composer install ` .
4850
@@ -52,30 +54,34 @@ If you are cloning the repository, you'll need to run `composer install`.
5254DebugBar is very easy to use and you can add it to any of your projects in no time.
5355The easiest way is using the ` render() ` functions
5456
55- <?php
56- use DebugBar\StandardDebugBar;
57- use DebugBar\JavascriptRenderer;
58-
59- $debugbar = new StandardDebugBar();
60- $debugbarRenderer = $debugbar->getJavascriptRenderer();
61-
62- $debugbar["messages"]->addMessage("hello world!");
63- ?>
64- <html>
65- <head>
66- <?php echo $debugbarRenderer->renderHead() ?>
67- </head>
68- <body>
69- ...
70- <?php echo $debugbarRenderer->render() ?>
71- </body>
72- </html>
57+ ``` PHP
58+ <?php
59+ use DebugBar\StandardDebugBar;
60+ use DebugBar\JavascriptRenderer;
61+
62+ $debugbar = new StandardDebugBar();
63+ $debugbarRenderer = $debugbar->getJavascriptRenderer();
64+
65+ $debugbar["messages"]->addMessage("hello world!");
66+ ?>
67+ <html >
68+ <head >
69+ <?php echo $debugbarRenderer->renderHead() ?>
70+ </head >
71+ <body >
72+ ...
73+ <?php echo $debugbarRenderer->render() ?>
74+ </body >
75+ </html >+6
76+ ```
7377
7478The DebugBar uses DataCollectors to collect data from your PHP code. Some of them are
7579automated but others are manual. Use the ` DebugBar ` like an array where keys are the
7680collector names. In our previous example, we add a message to the ` MessagesCollector ` :
7781
78- $debugbar["messages"]->addMessage("hello world!");
82+ ``` PHP
83+ $debugbar["messages"]->addMessage("hello world!");
84+ ```
7985
8086` StandardDebugBar ` activates the following collectors:
8187
0 commit comments