/**
  * @param Pomm $pomm
  *
  * @return null
  */
 public function configure(Pomm $pomm)
 {
     $callable = [$this->datacollector, 'execute'];
     foreach ($pomm->getSessionBuilders() as $name => $builder) {
         $pomm->addPostConfiguration($name, function ($session) use($callable) {
             $session->getClientUsingPooler('listener', 'query')->attachAction($callable);
         });
     }
 }
 public function __construct(Pomm $pomm, Stopwatch $stopwatch = null)
 {
     $this->stopwatch = $stopwatch;
     $this->data = ['time' => 0, 'queries' => [], 'exception' => null];
     $callable = [$this, 'execute'];
     foreach ($pomm->getSessionBuilders() as $name => $builder) {
         $pomm->addPostConfiguration($name, function ($session) use($callable) {
             $session->getClientUsingPooler('listener', 'query')->attachAction($callable);
         });
     }
 }