|
@@ 209-212 (lines=4) @@
|
| 206 |
|
public function __call($method, $arguments) |
| 207 |
|
{ |
| 208 |
|
switch (true) { |
| 209 |
|
case (0 === strpos($method, 'findBy')): |
| 210 |
|
$fieldName = strtolower(substr($method, 6)); |
| 211 |
|
$methodName = 'findBy'; |
| 212 |
|
break; |
| 213 |
|
|
| 214 |
|
case (0 === strpos($method, 'findOneBy')): |
| 215 |
|
$fieldName = strtolower(substr($method, 9)); |
|
@@ 214-217 (lines=4) @@
|
| 211 |
|
$methodName = 'findBy'; |
| 212 |
|
break; |
| 213 |
|
|
| 214 |
|
case (0 === strpos($method, 'findOneBy')): |
| 215 |
|
$fieldName = strtolower(substr($method, 9)); |
| 216 |
|
$methodName = 'findOneBy'; |
| 217 |
|
break; |
| 218 |
|
|
| 219 |
|
default: |
| 220 |
|
throw new \BadMethodCallException( |