Skip to content

Commit 09c1b29

Browse files
committed
Add documentation on how to use config file
1 parent 1c19534 commit 09c1b29

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,20 @@ shutdown handler:
6868
$profiler->start(false);
6969
```
7070

71+
## Using config file
72+
73+
You can create `config/config.php` and load config from there:
74+
75+
1. copy `config/config.default.php` to `config/config.php`
76+
2. use `Config::create()` to `new Profiler`
77+
78+
```php
79+
// Config::create() will load config/config.default.php
80+
// and then merge with config/config.php (if it exists).
81+
$config = \Xhgui\Profiler\Config::create();
82+
$profiler = new \Xhgui\Profiler\Profiler($config);
83+
```
84+
7185
## Advanced Usage
7286

7387
You might want to control capture and sending yourself,

0 commit comments

Comments
 (0)