simplified __call method
This commit is contained in:
parent
5b18718b92
commit
029071a144
@ -210,13 +210,13 @@ class EntityRepository implements ObjectRepository
|
||||
public function __call($method, $arguments)
|
||||
{
|
||||
switch (true) {
|
||||
case (substr($method, 0, 6) == 'findBy'):
|
||||
$by = substr($method, 6, strlen($method));
|
||||
case (0 === strpos($method, 'findBy')):
|
||||
$by = substr($method, 6);
|
||||
$method = 'findBy';
|
||||
break;
|
||||
|
||||
case (substr($method, 0, 9) == 'findOneBy'):
|
||||
$by = substr($method, 9, strlen($method));
|
||||
case (0 === strpos($method, 'findOneBy')):
|
||||
$by = substr($method, 9);
|
||||
$method = 'findOneBy';
|
||||
break;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user