|
@@ 645-649 (lines=5) @@
|
| 642 |
|
} |
| 643 |
|
|
| 644 |
|
// Format validation |
| 645 |
|
if (!is_array($method) || !isset($method[0]) || isset($method[2])) { |
| 646 |
|
throw new InvalidArgumentException( |
| 647 |
|
"'calls' entries in service definition should be 1 or 2 element arrays." |
| 648 |
|
); |
| 649 |
|
} |
| 650 |
|
if (!is_string($method[0])) { |
| 651 |
|
throw new InvalidArgumentException("1st element of a 'calls' entry should be a string"); |
| 652 |
|
} |
|
@@ 653-655 (lines=3) @@
|
| 650 |
|
if (!is_string($method[0])) { |
| 651 |
|
throw new InvalidArgumentException("1st element of a 'calls' entry should be a string"); |
| 652 |
|
} |
| 653 |
|
if (isset($method[1]) && !is_array($method[1])) { |
| 654 |
|
throw new InvalidArgumentException("2nd element of a 'calls' entry should an arguments array"); |
| 655 |
|
} |
| 656 |
|
|
| 657 |
|
// Check that the method exists and is callable |
| 658 |
|
$objectMethod = array($object, $method[0]); |