IMO this would be easiert using a Closure, e.g.

```
return $con->transaction(function() use ($con) {
  $query->doInsert($con);
 });
```