1 | <?php |
||
3 | class Provider extends Singleton |
||
4 | { |
||
5 | /** The methods loaded by the provider */ |
||
6 | protected $methods; |
||
7 | |||
8 | /** |
||
9 | * Get the method object corresponding to the name |
||
10 | * |
||
11 | * @param string $methodName The class name of the method to get the instance for |
||
12 | * |
||
13 | * @return boolean|stdClass The specified method class instance or false if it is not loaded |
||
14 | */ |
||
15 | public function getMethodByName($methodName) |
||
27 | |||
28 | /** |
||
29 | * Calls the indicated function on each method and add the result |
||
30 | * |
||
31 | * @param string $functionName The function to call |
||
32 | * @param string $checkField A field to check if it is set a certain way before calling the function |
||
33 | * @param mixed $checkValue The value that field should be set to to not call the function |
||
34 | * |
||
35 | * @return integer The added returnValue |
||
36 | */ |
||
37 | protected function addFromEach($functionName, $checkField = false, $checkValue = false) |
||
55 | |||
56 | /** |
||
57 | * Calls the indicated function on each method |
||
58 | * |
||
59 | * @param string $functionName The function to call |
||
60 | * @param array $args The arguments for the function |
||
61 | * @param string $checkField A field to check if it is set a certain way before calling the function |
||
62 | * @param mixed $checkValue The value that field should be set to to not call the function |
||
63 | * @param callable $resFunction Function to call on the result, otherwise the function will return on the first non-false result |
||
64 | * |
||
65 | * @return Auth\Group|Auth\User|false The merged returnValue |
||
66 | */ |
||
67 | protected function callOnEach($functionName, $args, $checkField = false, $checkValue = false, $resFunction = null) |
||
93 | |||
94 | protected function callFunction($methodName, $functionName, $args, $checkField = false, $checkValue = false, $resFunction = null) |
||
103 | } |
||
104 | /* vim: set tabstop=4 shiftwidth=4 expandtab: */ |
||
105 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: