| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | <?php |
||
| 33 | public function find($id) |
||
| 34 | { |
||
| 35 | $image = $this->dm |
||
| 36 | ->getRepository($this->class) |
||
| 37 | ->find(new \MongoId($id)); |
||
| 38 | |||
| 39 | if (!$image) { |
||
| 40 | throw new NotLoadableException(sprintf('Source image was not found with id "%s"', $id)); |
||
| 41 | } |
||
| 42 | |||
| 43 | return $image->getFile()->getBytes(); |
||
| 44 | } |
||
| 45 | } |
||
| 46 |