Update call_user_func_array() to support collections
[hiphop-php.git] / hphp / system / idl / class.idl.json
blobf241ea0a056d246742a495c0a3e28e0850edbe4e
2     "preamble": "",
3     "consts": [
4     ],
5     "funcs": [
6         {
7             "name": "get_declared_classes",
8             "desc": "Gets the declared classes.",
9             "flags": [
10             ],
11             "return": {
12                 "type": "VariantMap",
13                 "desc": "Returns an array of the names of the declared classes in the current script.\n\nNote that depending on what extensions you have compiled or loaded into PHP, additional classes could be present. This means that you will not be able to define your own classes using these names. There is a list of predefined classes in the Predefined Classes section of the appendices."
14             },
15             "args": [
16             ]
17         },
18         {
19             "name": "get_declared_interfaces",
20             "desc": "Gets the declared interfaces.",
21             "flags": [
22             ],
23             "return": {
24                 "type": "VariantMap",
25                 "desc": "Returns an array of the names of the declared interfaces in the current script."
26             },
27             "args": [
28             ]
29         },
30         {
31             "name": "get_declared_traits",
32             "desc": "Gets the declared traits.",
33             "flags": [
34             ],
35             "return": {
36                 "type": "VariantMap",
37                 "desc": "Returns an array of the names of the declared traits in the current script."
38             },
39             "args": [
40             ]
41         },
42         {
43             "name": "class_alias",
44             "desc": "Creates an alias named alias based on the defined class original. The aliased class is exactly the same as the original class.",
45             "flags": [
46             ],
47             "return": {
48                 "type": "Boolean",
49                 "desc": "Returns TRUE on success or FALSE on failure."
50             },
51             "args": [
52                 {
53                     "name": "original",
54                     "type": "String",
55                     "desc": "The original class."
56                 },
57                 {
58                     "name": "alias",
59                     "type": "String",
60                     "desc": "The alias name for the class."
61                 },
62                 {
63                     "name": "autoload",
64                     "type": "Boolean",
65                     "value": "true",
66                     "desc": "Whether do autoload if the original class is not found."
67                 }
68             ]
69         },
70         {
71             "name": "class_exists",
72             "desc": "This function checks whether or not the given class has been defined.",
73             "flags": [
74             ],
75             "return": {
76                 "type": "Boolean",
77                 "desc": "Returns TRUE if class_name is a defined class, FALSE otherwise."
78             },
79             "args": [
80                 {
81                     "name": "class_name",
82                     "type": "String",
83                     "desc": "The class name. The name is matched in a case-insensitive manner."
84                 },
85                 {
86                     "name": "autoload",
87                     "type": "Boolean",
88                     "value": "true",
89                     "desc": "Whether or not to call __autoload by default."
90                 }
91             ]
92         },
93         {
94             "name": "interface_exists",
95             "desc": "Checks if the given interface has been defined.",
96             "flags": [
97             ],
98             "return": {
99                 "type": "Boolean",
100                 "desc": "Returns TRUE if the interface given by interface_name has been defined, FALSE otherwise."
101             },
102             "args": [
103                 {
104                     "name": "interface_name",
105                     "type": "String",
106                     "desc": "The interface name"
107                 },
108                 {
109                     "name": "autoload",
110                     "type": "Boolean",
111                     "value": "true",
112                     "desc": "Whether to call __autoload or not by default."
113                 }
114             ]
115         },
116         {
117             "name": "trait_exists",
118             "desc": "Checks if the given trait has been defined.",
119             "flags": [
120             ],
121             "return": {
122                 "type": "Boolean",
123                 "desc": "Returns TRUE if the trait given by trait_name has been defined, FALSE otherwise."
124             },
125             "args": [
126                 {
127                     "name": "trait_name",
128                     "type": "String",
129                     "desc": "The trait name"
130                 },
131                 {
132                     "name": "autoload",
133                     "type": "Boolean",
134                     "value": "true",
135                     "desc": "Whether to call __autoload or not by default."
136                 }
137             ]
138         },
139         {
140             "name": "get_class_methods",
141             "desc": "Gets the class methods names.",
142             "flags": [
143             ],
144             "return": {
145                 "type": "VariantMap",
146                 "desc": "Returns an array of method names defined for the class specified by class_name. In case of an error, it returns NULL."
147             },
148             "args": [
149                 {
150                     "name": "class_or_object",
151                     "type": "Variant",
152                     "desc": "The class name or an object instance"
153                 }
154             ]
155         },
156         {
157             "name": "get_class_vars",
158             "desc": "Get the default properties of the given class.",
159             "flags": [
160             ],
161             "return": {
162                 "type": "Variant",
163                 "desc": "Returns an associative array of declared properties visible from the current scope, with their default value. The resulting array elements are in the form of varname => value. In case of an error, it returns false."
164             },
165             "args": [
166                 {
167                     "name": "class_name",
168                     "type": "String",
169                     "desc": "The class name"
170                 }
171             ]
172         },
173         {
174             "name": "get_class_constants",
175             "desc": "Get the constants of the given class.",
176             "flags": [
177                 "HipHopSpecific"
178             ],
179             "return": {
180                 "type": "VariantMap",
181                 "desc": "Returns an associative array of constants with their values."
182             },
183             "args": [
184                 {
185                     "name": "class_name",
186                     "type": "String",
187                     "desc": "The class name"
188                 }
189             ]
190         },
191         {
192             "name": "get_class",
193             "desc": "Gets the name of the class of the given object.",
194             "flags": [
195             ],
196             "return": {
197                 "type": "Variant",
198                 "desc": "Returns the name of the class of which object is an instance. Returns FALSE if object is not an object.\n\nIf object is omitted when inside a class, the name of that class is returned."
199             },
200             "args": [
201                 {
202                     "name": "object",
203                     "type": "Variant",
204                     "value": "null_variant",
205                     "desc": "The tested object. This parameter may be omitted when inside a class."
206                 }
207             ]
208         },
209         {
210             "name": "get_parent_class",
211             "desc": "Retrieves the parent class name for object or class.",
212             "flags": [
213             ],
214             "return": {
215                 "type": "Variant",
216                 "desc": "Returns the name of the parent class of the class of which object is an instance or the name.\n\nIf the object does not have a parent FALSE will be returned.\n\nIf called without parameter outside object, this function returns FALSE."
217             },
218             "args": [
219                 {
220                     "name": "object",
221                     "type": "Variant",
222                     "value": "null_variant",
223                     "desc": "The tested object or class name"
224                 }
225             ]
226         },
227         {
228             "name": "is_a",
229             "desc": "Checks if the given object is of this class or has this class as one of its parents.",
230             "flags": [
231             ],
232             "return": {
233                 "type": "Boolean",
234                 "desc": "Returns TRUE if the object is of this class or has this class as one of its parents, FALSE otherwise."
235             },
236             "args": [
237                 {
238                     "name": "class_or_object",
239                     "type": "Variant",
240                     "desc": "The tested object"
241                 },
242                 {
243                     "name": "class_name",
244                     "type": "String",
245                     "desc": "The class name"
246                 },
247                 {
248                     "name": "allow_string",
249                     "type": "Boolean",
250                     "value": "false",
251                     "desc": "If this parameter set to false (default), string class name as object is not allowed. This also prevents from calling autoloader if the class doesn't exist."
252                 }
253             ]
254         },
255         {
256             "name": "is_subclass_of",
257             "desc": "Checks if the given object has the class class_name as one of its parents.",
258             "flags": [
259             ],
260             "return": {
261                 "type": "Boolean",
262                 "desc": "This function returns TRUE if the object object, belongs to a class which is a subclass of class_name, FALSE otherwise."
263             },
264             "args": [
265                 {
266                     "name": "class_or_object",
267                     "type": "Variant",
268                     "desc": "A class name or an object instance"
269                 },
270                 {
271                     "name": "class_name",
272                     "type": "String",
273                     "desc": "The class name"
274                 },
275                 {
276                     "name": "allow_string",
277                     "type": "Boolean",
278                     "value": "true",
279                     "desc": "If this parameter set to false, string class name as object is not allowed. This also prevents from calling autoloader if the class doesn't exist."
280                 }
281             ]
282         },
283         {
284             "name": "method_exists",
285             "desc": "Checks if the class method exists in the given object.",
286             "flags": [
287             ],
288             "return": {
289                 "type": "Boolean",
290                 "desc": "Returns TRUE if the method given by method_name has been defined for the given object, FALSE otherwise."
291             },
292             "args": [
293                 {
294                     "name": "class_or_object",
295                     "type": "Variant",
296                     "desc": "An object instance or a class name"
297                 },
298                 {
299                     "name": "method_name",
300                     "type": "String",
301                     "desc": "The method name"
302                 }
303             ]
304         },
305         {
306             "name": "property_exists",
307             "desc": "This function checks if the given property exists in the specified class.\n\nAs opposed with isset(), property_exists() returns TRUE even if the property has the value NULL.",
308             "flags": [
309             ],
310             "return": {
311                 "type": "Variant",
312                 "desc": "Returns TRUE if the property exists, FALSE if it doesn't exist or NULL in case of an error.",
313                 "predicted_type": 1
314             },
315             "args": [
316                 {
317                     "name": "class_or_object",
318                     "type": "Variant",
319                     "desc": "The class name or an object of the class to test for"
320                 },
321                 {
322                     "name": "property",
323                     "type": "String",
324                     "desc": "The name of the property"
325                 }
326             ]
327         },
328         {
329             "name": "get_object_vars",
330             "desc": "Gets the accessible non-static properties of the given object according to scope.",
331             "flags": [
332                 "ZendParamMode"
333             ],
334             "return": {
335                 "type": "Variant",
336                 "desc": "Returns an associative array of defined object accessible non-static properties for the specified object in scope. If a property have not been assigned a value, it will be returned with a NULL value."
337             },
338             "args": [
339                 {
340                     "name": "object",
341                     "type": "Object",
342                     "desc": "An object instance."
343                 }
344             ]
345         },
346         {
347             "name": "call_user_method_array",
348             "flags": [
349             ],
350             "return": {
351                 "type": "Variant"
352             },
353             "args": [
354                 {
355                     "name": "method_name",
356                     "type": "String",
357                     "desc": "The method name being called."
358                 },
359                 {
360                     "name": "obj",
361                     "type": "Variant",
362                     "desc": "The object that method_name is being called on.",
363                     "ref": true
364                 },
365                 {
366                     "name": "paramarr",
367                     "type": "Variant",
368                     "desc": "An array of parameters."
369                 }
370             ]
371         },
372         {
373             "name": "call_user_method",
374             "flags": [
375                 "VariableArguments"
376             ],
377             "return": {
378                 "type": "Variant"
379             },
380             "args": [
381                 {
382                     "name": "method_name",
383                     "type": "String",
384                     "desc": "The method name being called."
385                 },
386                 {
387                     "name": "obj",
388                     "type": "Variant",
389                     "desc": "The object that method_name is being called on.",
390                     "ref": true
391                 }
392             ]
393         }
394     ],
395     "classes": [
396     ]