| Conditions | 3 |
| Paths | 4 |
| Total Lines | 18 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | <?php |
||
| 32 | public function doRequest($request) |
||
| 33 | { |
||
| 34 | if ($this->requested) { |
||
| 35 | $this->getKernel()->shutdown(); |
||
| 36 | $this->getKernel()->boot(); |
||
| 37 | } |
||
| 38 | if (null === self::$connection) { |
||
| 39 | self::$connection = $this->getContainer()->get('doctrine.dbal.default_connection'); |
||
| 40 | } else { |
||
| 41 | $this->getContainer()->set('doctrine.dbal.default_connection', self::$connection); |
||
| 42 | } |
||
| 43 | $this->requested = true; |
||
| 44 | self::$connection->beginTransaction(); |
||
| 45 | $response = $this->getKernel()->handle($request); |
||
| 46 | self::$connection->rollback(); |
||
| 47 | |||
| 48 | return $response; |
||
| 49 | } |
||
| 50 | } |
||
| 51 |