1 | <?php |
||
29 | class CallableObject |
||
30 | { |
||
31 | /** |
||
32 | * A reference to the callable object the user has registered |
||
33 | * |
||
34 | * @var object |
||
35 | */ |
||
36 | private $registeredObject = null; |
||
37 | |||
38 | /** |
||
39 | * The reflection class of the user registered callable object |
||
40 | * |
||
41 | * @var \ReflectionClass |
||
42 | */ |
||
43 | private $reflectionClass; |
||
44 | |||
45 | /** |
||
46 | * A list of methods of the user registered callable object the library must not export to javascript |
||
47 | * |
||
48 | * @var array |
||
49 | */ |
||
50 | private $aProtectedMethods = []; |
||
51 | |||
52 | /** |
||
53 | * The character to use as separator in javascript class names |
||
54 | * |
||
55 | * @var string |
||
56 | */ |
||
57 | private $separator = '.'; |
||
58 | |||
59 | /** |
||
60 | * The class constructor |
||
61 | * |
||
62 | * @param string $sCallable The callable object instance or class name |
||
63 | * |
||
64 | */ |
||
65 | public function __construct($sCallable) |
||
69 | |||
70 | /** |
||
71 | * Return the class name of this callable object, without the namespace if any |
||
72 | * |
||
73 | * @return string |
||
74 | */ |
||
75 | public function getClassName() |
||
80 | |||
81 | /** |
||
82 | * Return the name of this callable object |
||
83 | * |
||
84 | * @return string |
||
85 | */ |
||
86 | public function getName() |
||
91 | |||
92 | /** |
||
93 | * Return the name of the corresponding javascript class |
||
94 | * |
||
95 | * @return string |
||
96 | */ |
||
97 | public function getJsName() |
||
101 | |||
102 | /** |
||
103 | * Return the namespace of this callable object |
||
104 | * |
||
105 | * @return string |
||
106 | */ |
||
107 | public function getNamespace() |
||
112 | |||
113 | /** |
||
114 | * Set configuration options / call options for each method |
||
115 | * |
||
116 | * @param string $sName The name of the configuration option |
||
117 | * @param string $sValue The value of the configuration option |
||
118 | * |
||
119 | * @return void |
||
120 | */ |
||
121 | public function configure($sName, $sValue) |
||
147 | |||
148 | /** |
||
149 | * Return a list of methods of the callable object to export to javascript |
||
150 | * |
||
151 | * @return array |
||
152 | */ |
||
153 | public function getMethods() |
||
173 | |||
174 | /** |
||
175 | * Return the registered callable object |
||
176 | * |
||
177 | * @return object |
||
178 | */ |
||
179 | public function getRegisteredObject() |
||
203 | |||
204 | /** |
||
205 | * Check if the specified method name is one of the methods of the registered callable object |
||
206 | * |
||
207 | * @param string $sMethod The name of the method to check |
||
208 | * |
||
209 | * @return boolean |
||
210 | */ |
||
211 | public function hasMethod($sMethod) |
||
215 | |||
216 | /** |
||
217 | * Call the specified method of the registered callable object using the specified array of arguments |
||
218 | * |
||
219 | * @param string $sMethod The name of the method to call |
||
220 | * @param array $aArgs The arguments to pass to the method |
||
221 | * |
||
222 | * @return void |
||
223 | */ |
||
224 | public function call($sMethod, $aArgs) |
||
238 | } |
||
239 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.