cvs: phpdoc /en/reference/classobj/functions get-declared-classes.xml get-object-vars.xml method-exists.xml

From: Date: Thu, 06 May 2004 15:25:58 +0000
Subject: cvs: phpdoc /en/reference/classobj/functions get-declared-classes.xml get-object-vars.xml method-exists.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969360524@lists.php.net to get a copy of this message
dams Thu May 6 11:25:58 2004 EDT Modified files: /phpdoc/en/reference/classobj/functions get-declared-classes.xml get-object-vars.xml method-exists.xml Log: cosmetics and examples http://cvs.php.net/diff.php/phpdoc/en/reference/classobj/functions/get-declared-classes.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc/en/reference/classobj/functions/get-declared-classes.xml diff -u phpdoc/en/reference/classobj/functions/get-declared-classes.xml:1.3 phpdoc/en/reference/classobj/functions/get-declared-classes.xml:1.4 --- phpdoc/en/reference/classobj/functions/get-declared-classes.xml:1.3 Mon Oct 21 09:41:39 2002 +++ phpdoc/en/reference/classobj/functions/get-declared-classes.xml Thu May 6 11:25:58 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <!-- splitted from ./en/functions/classobj.xml, last change in rev 1.11 --> <refentry id="function.get-declared-classes"> <refnamediv> @@ -35,6 +35,31 @@ the appendices. </para> </note> + <para> + <example> + <title><function>get_declared_classes</function> example</title> + <programlisting role="php"> +<![CDATA[ +<?php +print_r(get_declared_classes()); +?> +]]> + </programlisting> + <para> + This script will output something close to : + </para> + <screen> +<![CDATA[ +Array +( + [0] => stdClass + [1] => __PHP_Incomplete_Class + [2] => Directory +) +]]> + </screen> + </example> + </para> <simpara> See also <function>class_exists</function>. </simpara> http://cvs.php.net/diff.php/phpdoc/en/reference/classobj/functions/get-object-vars.xml?r1=1.6&r2=1.7&ty=u Index: phpdoc/en/reference/classobj/functions/get-object-vars.xml diff -u phpdoc/en/reference/classobj/functions/get-object-vars.xml:1.6 phpdoc/en/reference/classobj/functions/get-object-vars.xml:1.7 --- phpdoc/en/reference/classobj/functions/get-object-vars.xml:1.6 Thu Jan 15 07:42:05 2004 +++ phpdoc/en/reference/classobj/functions/get-object-vars.xml Thu May 6 11:25:58 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <!-- splitted from ./en/functions/classobj.xml, last change in rev 1.1 --> <refentry id="function.get-object-vars"> <refnamediv> @@ -21,8 +21,7 @@ In versions prior to PHP 4.2.0, if the variables declared in the class of which the <parameter>obj</parameter> 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 <constant>NULL</constant> - value. + after PHP 4.2.0, the key will be assigned with a &null; value. </para> </note> <para> http://cvs.php.net/diff.php/phpdoc/en/reference/classobj/functions/method-exists.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/classobj/functions/method-exists.xml diff -u phpdoc/en/reference/classobj/functions/method-exists.xml:1.2 phpdoc/en/reference/classobj/functions/method-exists.xml:1.3 --- phpdoc/en/reference/classobj/functions/method-exists.xml:1.2 Wed Apr 17 02:36:43 2002 +++ phpdoc/en/reference/classobj/functions/method-exists.xml Thu May 6 11:25:58 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- splitted from ./en/functions/classobj.xml, last change in rev 1.9 --> <refentry id="function.method-exists"> <refnamediv> @@ -18,6 +18,27 @@ <parameter>method_name</parameter> has been defined for the given <parameter>object</parameter>, &false; otherwise. </para> + <para> + <example> + <title><function>method_exists</function> example</title> + <programlisting role="php"> +<![CDATA[ +<?php +$directory = new Directory('.'); +var_dump(method_exists($directory,'read')); +?> +]]> + </programlisting> + <para> + This script will output : + </para> + <screen> +<![CDATA[ +bool(true) +]]> + </screen> + </example> + </para> </refsect1> </refentry>

« previous php.doc (#969360524) next »