Fix heredoc/nowdoc bugs with large docs, docs crossing buffer boundaries
[hiphop-php.git] / hphp / idl / class.idl.php
blobb9bbcab0b7a854cffd16c1a57423b09ef5035fe6
1 <?php
2 /**
3 * Automatically generated by running "php schema.php class".
5 * You may modify the file, but re-running schema.php against this file will
6 * standardize the format without losing your schema changes. It does lose
7 * any changes that are not part of schema. Use "note" field to comment on
8 * schema itself, and "note" fields are not used in any code generation but
9 * only staying within this file.
11 ///////////////////////////////////////////////////////////////////////////////
12 // Preamble: C++ code inserted at beginning of ext_{name}.h
14 DefinePreamble(<<<CPP
16 CPP
19 ///////////////////////////////////////////////////////////////////////////////
20 // Constants
22 // array (
23 // 'name' => name of the constant
24 // 'type' => type of the constant
25 // 'note' => additional note about this constant's schema
26 // )
29 ///////////////////////////////////////////////////////////////////////////////
30 // Functions
32 // array (
33 // 'name' => name of the function
34 // 'desc' => description of the function's purpose
35 // 'flags' => attributes of the function, see base.php for possible values
36 // 'opt' => optimization callback function's name for compiler
37 // 'note' => additional note about this function's schema
38 // 'return' =>
39 // array (
40 // 'type' => return type, use Reference for ref return
41 // 'desc' => description of the return value
42 // )
43 // 'args' => arguments
44 // array (
45 // 'name' => name of the argument
46 // 'type' => type of the argument, use Reference for output parameter
47 // 'value' => default value of the argument
48 // 'desc' => description of the argument
49 // )
50 // )
52 DefineFunction(
53 array(
54 'name' => "get_declared_classes",
55 'desc' => "Gets the declared classes.",
56 'flags' => HasDocComment,
57 'return' => array(
58 'type' => VariantMap,
59 '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.",
61 'taint_observer' => false,
62 ));
64 DefineFunction(
65 array(
66 'name' => "get_declared_interfaces",
67 'desc' => "Gets the declared interfaces.",
68 'flags' => HasDocComment,
69 'return' => array(
70 'type' => VariantMap,
71 'desc' => "Returns an array of the names of the declared interfaces in the current script.",
73 'taint_observer' => false,
74 ));
76 DefineFunction(
77 array(
78 'name' => "get_declared_traits",
79 'desc' => "Gets the declared traits.",
80 'flags' => HasDocComment,
81 'return' => array(
82 'type' => VariantMap,
83 'desc' => "Returns an array of the names of the declared traits in the current script.",
85 ));
87 DefineFunction(
88 array(
89 'name' => "class_exists",
90 'desc' => "This function checks whether or not the given class has been defined.",
91 'flags' => HasDocComment,
92 'return' => array(
93 'type' => Boolean,
94 'desc' => "Returns TRUE if class_name is a defined class, FALSE otherwise.",
96 'args' => array(
97 array(
98 'name' => "class_name",
99 'type' => String,
100 'desc' => "The class name. The name is matched in a case-insensitive manner.",
102 array(
103 'name' => "autoload",
104 'type' => Boolean,
105 'value' => "true",
106 'desc' => "Whether or not to call __autoload by default.",
109 'taint_observer' => false,
112 DefineFunction(
113 array(
114 'name' => "interface_exists",
115 'desc' => "Checks if the given interface has been defined.",
116 'flags' => HasDocComment,
117 'return' => array(
118 'type' => Boolean,
119 'desc' => "Returns TRUE if the interface given by interface_name has been defined, FALSE otherwise.",
121 'args' => array(
122 array(
123 'name' => "interface_name",
124 'type' => String,
125 'desc' => "The interface name",
127 array(
128 'name' => "autoload",
129 'type' => Boolean,
130 'value' => "true",
131 'desc' => "Whether to call __autoload or not by default.",
134 'taint_observer' => false,
137 DefineFunction(
138 array(
139 'name' => "trait_exists",
140 'desc' => "Checks if the given trait has been defined.",
141 'flags' => HasDocComment,
142 'return' => array(
143 'type' => Boolean,
144 'desc' => "Returns TRUE if the trait given by trait_name has been defined, FALSE otherwise.",
146 'args' => array(
147 array(
148 'name' => "trait_name",
149 'type' => String,
150 'desc' => "The trait name",
152 array(
153 'name' => "autoload",
154 'type' => Boolean,
155 'value' => "true",
156 'desc' => "Whether to call __autoload or not by default.",
161 DefineFunction(
162 array(
163 'name' => "get_class_methods",
164 'desc' => "Gets the class methods names.",
165 'flags' => HasDocComment,
166 'return' => array(
167 'type' => VariantMap,
168 'desc' => "Returns an array of method names defined for the class specified by class_name. In case of an error, it returns NULL.",
170 'args' => array(
171 array(
172 'name' => "class_or_object",
173 'type' => Variant,
174 'desc' => "The class name or an object instance",
177 'taint_observer' => false,
180 DefineFunction(
181 array(
182 'name' => "get_class_vars",
183 'desc' => "Get the default properties of the given class.",
184 'flags' => HasDocComment,
185 'return' => array(
186 'type' => VariantMap,
187 '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.",
189 'args' => array(
190 array(
191 'name' => "class_name",
192 'type' => String,
193 'desc' => "The class name",
196 'taint_observer' => false,
199 DefineFunction(
200 array(
201 'name' => "get_class_constants",
202 'desc' => "Get the constants of the given class.",
203 'flags' => HasDocComment | HipHopSpecific,
204 'return' => array(
205 'type' => VariantMap,
206 'desc' => "Returns an associative array of constants with their values."
208 'args' => array(
209 array(
210 'name' => "class_name",
211 'type' => String,
212 'desc' => "The class name",
215 'taint_observer' => false,
218 DefineFunction(
219 array(
220 'name' => "get_class",
221 'desc' => "Gets the name of the class of the given object.",
222 'flags' => HasDocComment,
223 'return' => array(
224 'type' => Variant,
225 '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.",
227 'args' => array(
228 array(
229 'name' => "object",
230 'type' => Variant,
231 'value' => "null_variant",
232 'desc' => "The tested object. This parameter may be omitted when inside a class.",
235 'taint_observer' => false,
238 DefineFunction(
239 array(
240 'name' => "get_parent_class",
241 'desc' => "Retrieves the parent class name for object or class.",
242 'flags' => HasDocComment,
243 'return' => array(
244 'type' => Variant,
245 '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.",
247 'args' => array(
248 array(
249 'name' => "object",
250 'type' => Variant,
251 'value' => "null_variant",
252 'desc' => "The tested object or class name",
255 'taint_observer' => false,
258 DefineFunction(
259 array(
260 'name' => "is_a",
261 'desc' => "Checks if the given object is of this class or has this class as one of its parents.",
262 'flags' => HasDocComment,
263 'return' => array(
264 'type' => Boolean,
265 'desc' => "Returns TRUE if the object is of this class or has this class as one of its parents, FALSE otherwise.",
267 'args' => array(
268 array(
269 'name' => "class_or_object",
270 'type' => Variant,
271 'desc' => "The tested object",
273 array(
274 'name' => "class_name",
275 'type' => String,
276 'desc' => "The class name",
278 array(
279 'name' => 'allow_string',
280 'type' => Boolean,
281 'value' => "false",
282 '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.",
285 'taint_observer' => false,
288 DefineFunction(
289 array(
290 'name' => "is_subclass_of",
291 'desc' => "Checks if the given object has the class class_name as one of its parents.",
292 'flags' => HasDocComment,
293 'return' => array(
294 'type' => Boolean,
295 'desc' => "This function returns TRUE if the object object, belongs to a class which is a subclass of class_name, FALSE otherwise.",
297 'args' => array(
298 array(
299 'name' => "class_or_object",
300 'type' => Variant,
301 'desc' => "A class name or an object instance",
303 array(
304 'name' => "class_name",
305 'type' => String,
306 'desc' => "The class name",
308 array(
309 'name' => "allow_string",
310 'type' => Boolean,
311 'value' => "true",
312 '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.",
315 'taint_observer' => false,
318 DefineFunction(
319 array(
320 'name' => "method_exists",
321 'desc' => "Checks if the class method exists in the given object.",
322 'flags' => HasDocComment,
323 'return' => array(
324 'type' => Boolean,
325 'desc' => "Returns TRUE if the method given by method_name has been defined for the given object, FALSE otherwise.",
327 'args' => array(
328 array(
329 'name' => "class_or_object",
330 'type' => Variant,
331 'desc' => "An object instance or a class name",
333 array(
334 'name' => "method_name",
335 'type' => String,
336 'desc' => "The method name",
339 'taint_observer' => false,
342 DefineFunction(
343 array(
344 'name' => "property_exists",
345 '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.",
346 'flags' => HasDocComment,
347 'return' => array(
348 'type' => Boolean,
349 'desc' => "Returns TRUE if the property exists, FALSE if it doesn't exist or NULL in case of an error.",
351 'args' => array(
352 array(
353 'name' => "class_or_object",
354 'type' => Variant,
355 'desc' => "The class name or an object of the class to test for",
357 array(
358 'name' => "property",
359 'type' => String,
360 'desc' => "The name of the property",
363 'taint_observer' => false,
366 DefineFunction(
367 array(
368 'name' => "get_object_vars",
369 'desc' => "Gets the accessible non-static properties of the given object according to scope.",
370 'flags' => HasDocComment,
371 'return' => array(
372 'type' => Variant,
373 '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.",
375 'args' => array(
376 array(
377 'name' => "object",
378 'type' => Variant,
379 'desc' => "An object instance.",
382 'taint_observer' => false,
385 DefineFunction(
386 array(
387 'name' => "call_user_method_array",
388 'flags' => HasDocComment,
389 'return' => array(
390 'type' => Variant,
392 'args' => array(
393 array(
394 'name' => "method_name",
395 'type' => String,
396 'desc' => "The method name being called.",
398 array(
399 'name' => "obj",
400 'type' => Variant | Reference,
401 'desc' => "The object that method_name is being called on.",
403 array(
404 'name' => "paramarr",
405 'type' => VariantVec,
406 'desc' => "An array of parameters.",
409 'taint_observer' => false,
412 DefineFunction(
413 array(
414 'name' => "call_user_method",
415 'flags' => HasDocComment | VariableArguments,
416 'return' => array(
417 'type' => Variant,
419 'args' => array(
420 array(
421 'name' => "method_name",
422 'type' => String,
423 'desc' => "The method name being called.",
425 array(
426 'name' => "obj",
427 'type' => Variant | Reference,
428 'desc' => "The object that method_name is being called on.",
431 'taint_observer' => false,
435 ///////////////////////////////////////////////////////////////////////////////
436 // Classes
438 // BeginClass
439 // array (
440 // 'name' => name of the class
441 // 'desc' => description of the class's purpose
442 // 'flags' => attributes of the class, see base.php for possible values
443 // 'note' => additional note about this class's schema
444 // 'parent' => parent class name, if any
445 // 'ifaces' => array of interfaces tihs class implements
446 // 'bases' => extra internal and special base classes this class requires
447 // 'footer' => extra C++ inserted at end of class declaration
448 // )
450 // DefineConstant(..)
451 // DefineConstant(..)
452 // ...
453 // DefineFunction(..)
454 // DefineFunction(..)
455 // ...
456 // DefineProperty
457 // DefineProperty
459 // array (
460 // 'name' => name of the property
461 // 'type' => type of the property
462 // 'flags' => attributes of the property
463 // 'desc' => description of the property
464 // 'note' => additional note about this property's schema
465 // )
467 // EndClass()