https://github.com/senseexception/datacollectorbundle
An example bundle for creating additional DataCollector extending Symfony's Profiler
https://github.com/senseexception/datacollectorbundle
Last synced: 4 months ago
JSON representation
An example bundle for creating additional DataCollector extending Symfony's Profiler
- Host: GitHub
- URL: https://github.com/senseexception/datacollectorbundle
- Owner: SenseException
- Created: 2015-04-30T23:29:31.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2016-01-24T21:20:22.000Z (over 10 years ago)
- Last Synced: 2025-03-13T01:43:45.984Z (about 1 year ago)
- Language: HTML
- Size: 13.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DataCollectorBundle Example
[](https://insight.sensiolabs.com/projects/512be750-efeb-4e4c-b711-6457e10fbe0b)
A simple example Symfony Bundle for creating additional DataCollectors and adding them to Symfony's Profiler.
This Bundle adds a new DataCollector for client ip info to the Symfony Profiler menu, panel and toolbar to show how the Profiler can
be extended in Symfony. Feel free to use this as template for your own Profiler extension.
### Installation
Add the following package to your `composer.json`
```json
"require-dev": {
"senseexception/datacollector-bundle": "1.1.0"
}
```
and add the bundle to your AppKernel.php
```php
// app/AppKernel.php
//...
class AppKernel extends Kernel
{
//...
public function registerBundles()
{
//...
if (in_array($this->getEnvironment(), array('dev', 'test'), true)) {
//...
$bundles[] = new SenseException\Bundle\DataCollectorBundle\DataCollectorBundle();
}
//...
return $bundles;
}
//...
}
```