OpenXE/classes/Components/Database/docs/profiler.md

13 lines
240 B
Markdown
Raw Normal View History

2021-05-21 08:49:41 +02:00
# Profiler
```php
<?php
/** @var \Xentral\Components\Database\Profiler\Profiler $profiler */
$profiler = $container->get('DatabaseProfiler');
$profiler->setActive(true);
$database->fetchAll($sql);
var_dump($profiler->getContexts());
```