| Conditions | 4 |
| Paths | 8 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 36 | public function getObjects($class, $variable, $order = null, $one = false) |
||
| 37 | { |
||
| 38 | $variable = is_array($variable) ? $variable : [$variable]; |
||
| 39 | $order = is_array($order) ? $order : [$order]; |
||
| 40 | |||
| 41 | if ($one) { |
||
| 42 | $objects = $this->entityManager->getRepository($class)->findOneBy($variable, $order); |
||
| 43 | } else { |
||
| 44 | $objects = $this->entityManager->getRepository($class)->findBy($variable, $order); |
||
| 45 | } |
||
| 46 | |||
| 47 | return $objects; |
||
| 48 | } |
||
| 55 |