public function fetchIterator() { $obj = $this; return Stats::trace($this->_humanizedSql, $this->_boundValues, function () use($obj) { $pdoStatement = $obj->_createPdoStatement(); return new StatementIterator($pdoStatement); }); }
private function _createTraceRequest($request) { $_SERVER['REQUEST_URI'] = $request; Stats::trace('SELECT * FROM table WHERE id = ?', '10', function () { usleep(80000); return "result"; }); }