1
0
mirror of synced 2025-01-24 17:21:43 +03:00
DeliveryModuleBundle/Service/PinbaService.php
2019-12-30 17:19:18 +03:00

26 lines
526 B
PHP

<?php
namespace RetailCrm\DeliveryModuleBundle\Service;
class PinbaService
{
/**
* @param array $tags
* @param \Closure $handler
*
* @return mixed
*/
public function timerHandler(array $tags, \Closure $handler)
{
if (function_exists('pinba_timer_start')) {
$timer = pinba_timer_start($tags);
$response = $handler();
pinba_timer_stop($timer);
} else {
$response = $handler();
}
return $response;
}
}