Conditions | 4 |
Paths | 8 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
27 | public function getObjects($class, $variable, $order = null, $one = false) |
||
28 | { |
||
29 | $variable = \is_array($variable) ? $variable : [$variable]; |
||
30 | $order = \is_array($order) ? $order : [$order]; |
||
31 | |||
32 | if ($one) { |
||
33 | $objects = $this->entityManager->getRepository($class)->findOneBy($variable, $order); |
||
34 | } else { |
||
35 | $objects = $this->entityManager->getRepository($class)->findBy($variable, $order); |
||
36 | } |
||
37 | |||
38 | return $objects; |
||
39 | } |
||
46 |