From fc05600161a6108f7268b7f86ed5633c1618f5d9 Mon Sep 17 00:00:00 2001 From: Mehdi Achour Date: Sun, 14 Jan 2007 13:37:31 +0000 Subject: [PATCH] WS, prepare for new doc style git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@227208 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../functions/call-user-method-array.xml | 69 ++++++------ .../classobj/functions/call-user-method.xml | 91 ++++++++------- reference/classobj/functions/class-exists.xml | 101 +++++++++-------- .../classobj/functions/get-class-methods.xml | 106 +++++++++--------- .../classobj/functions/get-class-vars.xml | 85 +++++++------- reference/classobj/functions/get-class.xml | 101 +++++++++-------- .../functions/get-declared-classes.xml | 103 +++++++++-------- .../functions/get-declared-interfaces.xml | 64 +++++------ .../classobj/functions/get-object-vars.xml | 87 +++++++------- .../classobj/functions/get-parent-class.xml | 99 ++++++++-------- .../classobj/functions/interface-exists.xml | 72 ++++++------ reference/classobj/functions/is-a.xml | 92 ++++++++------- .../classobj/functions/is-subclass-of.xml | 85 +++++++------- .../classobj/functions/method-exists.xml | 69 ++++++------ .../classobj/functions/property-exists.xml | 6 +- 15 files changed, 601 insertions(+), 629 deletions(-) diff --git a/reference/classobj/functions/call-user-method-array.xml b/reference/classobj/functions/call-user-method-array.xml index fedc44f861..d99398d041 100644 --- a/reference/classobj/functions/call-user-method-array.xml +++ b/reference/classobj/functions/call-user-method-array.xml @@ -1,40 +1,37 @@ - - - - - call_user_method_array - - Call a user method given with an array of parameters [deprecated] - - - - Description - - mixedcall_user_method_array - stringmethod_name - objectobj - arrayparamarr - - - - The call_user_method_array function is deprecated - as of PHP 4.1.0, use the call_user_func_array variety - with the array(&$obj, "method_name") syntax instead. - - - - Calls the method referred by method_name from - the user defined obj object, using the parameters - in paramarr. - - - See also: - call_user_func_array, and - call_user_func. - - - + + + + call_user_method_array + Call a user method given with an array of parameters [deprecated] + + + Description + + mixedcall_user_method_array + stringmethod_name + objectobj + arrayparamarr + + + + The call_user_method_array function is deprecated + as of PHP 4.1.0, use the call_user_func_array variety + with the array(&$obj, "method_name") syntax instead. + + + + Calls the method referred by method_name from + the user defined obj object, using the parameters + in paramarr. + + + See also: + call_user_func_array, and + call_user_func. + + + - - - - call_user_method - - Call a user method on an specific object [deprecated] - - - - Description - - mixedcall_user_method - stringmethod_name - objectobj - mixedparameter - mixed... - - - - The call_user_method function is deprecated - as of PHP 4.1.0, use the call_user_func variety - with the array(&$obj, "method_name") syntax instead. - - - - Calls the method referred by method_name from - the user defined obj object. An example of usage - is below, where we define a class, instantiate an object and use - call_user_method to call indirectly its - print_info method. - - - - + + + + call_user_method + Call a user method on an specific object [deprecated] + + + Description + + mixedcall_user_method + stringmethod_name + objectobj + mixedparameter + mixed... + + + + The call_user_method function is deprecated + as of PHP 4.1.0, use the call_user_func variety + with the array(&$obj, "method_name") syntax instead. + + + + Calls the method referred by method_name from + the user defined obj object. An example of usage + is below, where we define a class, instantiate an object and use + call_user_method to call indirectly its + print_info method. + + + + NAME = $name; $this->TLD = $tld; } - function print_info($prestr = "") + function print_info($prestr = "") { echo $prestr . "Country: " . $this->NAME . "\n"; echo $prestr . "Top Level Domain: " . $this->TLD . "\n"; @@ -62,15 +59,15 @@ echo "\n* Calling the same method indirectly\n"; call_user_method("print_info", $cntry, "\t"); ?> ]]> - - - - - See also call_user_func_array, and - call_user_func. - - - + + + + + See also call_user_func_array, and + call_user_func. + + + - - - - class_exists - Checks if the class has been defined - - - Description - - boolclass_exists - stringclass_name - boolautoload - - - This function returns &true; if the class given by - class_name has been defined, - &false; otherwise. - - - - <function>class_exists</function> example - + + + + class_exists + Checks if the class has been defined + + + Description + + boolclass_exists + stringclass_name + boolautoload + + + This function returns &true; if the class given by + class_name has been defined, + &false; otherwise. + + + + <function>class_exists</function> example + ]]> - - - - - class_exists will attempt to call &link.autoload; by - default, if you don't want class_exists to - call &link.autoload;, you can set the parameter autoload - to &false;. - - - - <parameter>autoload</parameter> parameter example - + + + + + class_exists will attempt to call &link.autoload; by + default, if you don't want class_exists to + call &link.autoload;, you can set the parameter autoload + to &false;. + + + + <parameter>autoload</parameter> parameter example + ]]> - - - - - - The autoload parameter was added in PHP 5 - - - - See also interface_exists, and - get_declared_classes. - - - + + + + + + The autoload parameter was added in PHP 5 + + + + See also interface_exists, and + get_declared_classes. + + + + - - - get_class_methods - Returns an array of class methods' names - - - Description - - arrayget_class_methods - mixedclass_name - - - This function returns an array of method names defined for the - class specified by class_name. - In case of an error, it returns &null; - - - - As of PHP 4.0.6, you can specify the object itself instead of - class_name. For example: - - + + + get_class_methods + Returns an array of class methods' names + + + Description + + arrayget_class_methods + mixedclass_name + + + This function returns an array of method names defined for the + class specified by class_name. + In case of an error, it returns &null; + + + + As of PHP 4.0.6, you can specify the object itself instead of + class_name. For example: + + ]]> - - - - - - - <function>get_class_methods</function> example - + + + + + + + <function>get_class_methods</function> example + ]]> - - &example.outputs; - + + &example.outputs; + - - - - - - As of PHP 5, this function returns the name of the methods as they were - declared (case-sensitive). In PHP 4 they were lowercased. - - - - See also get_class, - get_class_vars and - get_object_vars. - - - + + + + + + As of PHP 5, this function returns the name of the methods as they were + declared (case-sensitive). In PHP 4 they were lowercased. + + + + See also get_class, + get_class_vars and + get_object_vars. + + + - - - - get_class_vars - - Returns an array of default properties of the class - - - - Description - - arrayget_class_vars - stringclass_name - - - This function will return an associative array of default public - properties of the class. The resulting array elements are in the - form of varname => value. - - - - Prior to PHP 4.2.0, Uninitialized class variables will not be reported - by get_class_vars. - - - - - <function>get_class_vars</function> example - + + + + get_class_vars + Returns an array of default properties of the class + + + Description + + arrayget_class_vars + stringclass_name + + + This function will return an associative array of default public + properties of the class. The resulting array elements are in the + form of varname => value. + + + + Prior to PHP 4.2.0, Uninitialized class variables will not be reported + by get_class_vars. + + + + + <function>get_class_vars</function> example + $value) { echo "$name : $value\n"; } -?> +?> ]]> - - &example.outputs; - + + &example.outputs; + - - - - - See also get_class_methods, - get_object_vars - - - + + + + + See also get_class_methods, + get_object_vars + + + - - - - get_class - Returns the name of the class of an object - - - Description - - stringget_class - objectobj - - - This function returns the name of the class of which the - object obj is an instance. Returns - &false; if obj is not an object. - - - - A class defined in a PHP extension is returned in its original notation. - In PHP 4 get_class returns a user defined class - name in lowercase, but in PHP 5 it will return the class name in it's - original notation too, just like class names from PHP extensions. - - - - - Since PHP 5, obj is optional if called from the - object's method. - - - - - Using <function>get_class</function> - + + + + get_class + Returns the name of the class of an object + + + Description + + stringget_class + objectobj + + + This function returns the name of the class of which the + object obj is an instance. Returns + &false; if obj is not an object. + + + + A class defined in a PHP extension is returned in its original notation. + In PHP 4 get_class returns a user defined class + name in lowercase, but in PHP 5 it will return the class name in it's + original notation too, just like class names from PHP extensions. + + + + + Since PHP 5, obj is optional if called from the + object's method. + + + + + Using <function>get_class</function> + name(); ?> ]]> - - &example.outputs; - + + &example.outputs; + - - - - - See also get_parent_class, - gettype, and - is_subclass_of. - - - + + + + + See also get_parent_class, + gettype, and + is_subclass_of. + + + - - - - get_declared_classes - Returns an array with the name of the defined classes - - - Description - - arrayget_declared_classes - - - - This function returns an array of the names of the declared classes - in the current script. - - - - In PHP 4.0.1pl2, three extra classes are returned at the beginning of - the array: stdClass (defined in - Zend/zend.c), - OverloadedTestClass (defined in - ext/standard/basic_functions.c) - and Directory - (defined in ext/standard/dir.c). - - - Also note that depending on what libraries you have compiled - 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. - - - - - <function>get_declared_classes</function> example - + + + + get_declared_classes + Returns an array with the name of the defined classes + + + Description + + arrayget_declared_classes + + + + This function returns an array of the names of the declared classes + in the current script. + + + + In PHP 4.0.1pl2, three extra classes are returned at the beginning of + the array: stdClass (defined in + Zend/zend.c), + OverloadedTestClass (defined in + ext/standard/basic_functions.c) + and Directory + (defined in ext/standard/dir.c). + + + Also note that depending on what libraries you have compiled + 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. + + + + + <function>get_declared_classes</function> example + ]]> - - &example.outputs.similar; - + + &example.outputs.similar; + Directory ) ]]> - - - - - See also class_exists, and - get_declared_interfaces. - - - + + + + + See also class_exists, and + get_declared_interfaces. + + + - - - get_declared_interfaces - - Returns an array of all declared interfaces - - - - Description - - arrayget_declared_interfaces - - - - This function returns an array of the names of the declared interfaces - in the current script. - - - - <function>get_declared_interfaces</function> example - + + + + get_declared_interfaces + Returns an array of all declared interfaces + + + Description + + arrayget_declared_interfaces + + + + This function returns an array of the names of the declared interfaces + in the current script. + + + + <function>get_declared_interfaces</function> example + ]]> - - &example.outputs.similar; - + + &example.outputs.similar; + SeekableIterator ) ]]> - - - - - See also get_declared_classes. - - - + + + + + See also get_declared_classes. + + + - - - - get_object_vars - Returns an associative array of object properties - - - Description - - arrayget_object_vars - objectobj - - - This function returns an associative array of defined object properties - for the specified object obj. - - - - In versions prior to PHP 4.2.0, if the variables declared in the class - of which the obj is an instance, have not been - assigned a value, those will not be returned in the array. In versions - after PHP 4.2.0, the key will be assigned with a &null; value. - - - - - Use of <function>get_object_vars</function> - + + + + get_object_vars + Returns an associative array of object properties + + + Description + + arrayget_object_vars + objectobj + + + This function returns an associative array of defined object properties + for the specified object obj. + + + + In versions prior to PHP 4.2.0, if the variables declared in the class + of which the obj is an instance, have not been + assigned a value, those will not be returned in the array. In versions + after PHP 4.2.0, the key will be assigned with a &null; value. + + + + + Use of <function>get_object_vars</function> + x = $x; $this->y = $y; } - function setLabel($label) + function setLabel($label) { $this->label = $label; } - function getPoint() + function getPoint() { return array("x" => $this->x, "y" => $this->y, @@ -62,9 +61,9 @@ print_r(get_object_vars($p1)); ?> ]]> - - &example.outputs; - + + &example.outputs; + point #1 ) ]]> - - - - - See also get_class_methods and - get_class_vars. - - - + + + + + See also get_class_methods and + get_class_vars. + + + - - - - get_parent_class - Retrieves the parent class name for object or class - - - Description - - stringget_parent_class - mixedobj - - - If obj is an object, returns the name of the - parent class of the class of which obj is an - instance. - - - If obj is a string, returns the name of the parent - class of the class with that name. This functionality was added in PHP - 4.0.5. - - - - Since PHP 5, obj is optional if called from the - object's method. - If called without parameter outside object, this function returns - &false; (or &null; with a warning before PHP 5.1.0). - - - - - Using <function>get_parent_class</function> - + + + + get_parent_class + Retrieves the parent class name for object or class + + + Description + + stringget_parent_class + mixedobj + + + If obj is an object, returns the name of the + parent class of the class of which obj is an + instance. + + + If obj is a string, returns the name of the parent + class of the class with that name. This functionality was added in PHP + 4.0.5. + + + + Since PHP 5, obj is optional if called from the + object's method. + If called without parameter outside object, this function returns + &false; (or &null; with a warning before PHP 5.1.0). + + + + + Using <function>get_parent_class</function> + ]]> - - &example.outputs; - + + &example.outputs; + - - - - - See also get_class and - is_subclass_of. - - - + + + + + See also get_class and + is_subclass_of. + + + - - - interface_exists - Checks if the interface has been defined - - - Description - - boolinterface_exists - stringinterface_name - boolautoload - - - This function returns &true; if the interface given by - interface_name has been defined, - &false; otherwise. - - - - <function>interface_exists</function> example - + + + + interface_exists + Checks if the interface has been defined + + + Description + + boolinterface_exists + stringinterface_name + boolautoload + + + This function returns &true; if the interface given by + interface_name has been defined, + &false; otherwise. + + + + <function>interface_exists</function> example + ]]> - - - - - interface_exists will attempt to call &link.autoload; by - default, if you don't want interface_exists to - call &link.autoload;, you can set the parameter autoload - to &false;. - - - See also class_exists. - - - + + + + + interface_exists will attempt to call &link.autoload; by + default, if you don't want interface_exists to + call &link.autoload;, you can set the parameter autoload + to &false;. + + + See also class_exists. + + + - - - - is_a - - Returns &true; if the object is of this class or has this class as - one of its parents - - - - Description - - boolis_a - objectobject - stringclass_name - - - This function returns &true; if the object is of this class or - has this class as one of its parents, &false; otherwise. - - - - <function>is_a</function> example - + + + + is_a + Returns &true; if the object is of this class or has this class as one of its parents + + + Description + + boolis_a + objectobject + stringclass_name + + + This function returns &true; if the object is of this class or + has this class as one of its parents, &false; otherwise. + + + + <function>is_a</function> example + ]]> - - - - - The is_a function is deprecated as of PHP 5 in - favor of the instanceof - type operator. In the above example we could use the following in - PHP 5: - - - - Using the <emphasis>instanceof</emphasis> operator in PHP 5 - + + + + + The is_a function is deprecated as of PHP 5 in + favor of the instanceof + type operator. In the above example we could use the following in + PHP 5: + + + + Using the <emphasis>instanceof</emphasis> operator in PHP 5 + ]]> - - - - - See also get_class, - get_parent_class, and - is_subclass_of. - - - + + + + + See also get_class, + get_parent_class, and + is_subclass_of. + + + - - - - is_subclass_of - - Returns &true; if the object has this class as one of its parents - - - - Description - - boolis_subclass_of - mixedobject - stringclass_name - - - This function returns &true; if the object - object, belongs to a class which is a - subclass of class_name, &false; otherwise. - - - - Since PHP 5.0.3 you may also specify the object - parameter as a string (the name of the class). - - - - - <function>is_subclass_of</function> example - + + + + is_subclass_of + Returns &true; if the object has this class as one of its parents + + + Description + + boolis_subclass_of + mixedobject + stringclass_name + + + This function returns &true; if the object + object, belongs to a class which is a + subclass of class_name, &false; otherwise. + + + + Since PHP 5.0.3 you may also specify the object + parameter as a string (the name of the class). + + + + + <function>is_subclass_of</function> example + ]]> - - &example.outputs; - + + &example.outputs; + - - - - - See also get_class, - get_parent_class and - is_a. - - - + + + + + See also get_class, + get_parent_class and + is_a. + + + - - - - method_exists - Checks if the class method exists - - - Description - - boolmethod_exists - objectobject - stringmethod_name - - - This function returns &true; if the method given by - method_name has been defined for the given - object, &false; otherwise. - - - - <function>method_exists</function> example - + + + + method_exists + Checks if the class method exists + + + Description + + boolmethod_exists + objectobject + stringmethod_name + + + This function returns &true; if the method given by + method_name has been defined for the given + object, &false; otherwise. + + + + <function>method_exists</function> example + ]]> - - &example.outputs; - + + &example.outputs; + - - - - - See also function_exists and - is_callable. - - - + + + + + See also function_exists and + is_callable. + + + + property_exists @@ -26,7 +26,6 @@ - &reftitle.parameters; @@ -50,7 +49,6 @@ - &reftitle.returnvalues; @@ -58,7 +56,6 @@ &null; in case of an error. - &reftitle.examples; @@ -88,7 +85,6 @@ myClass::test(); - &reftitle.seealso;