gwynne Sat Sep 1 10:15:38 2007 UTC
Modified files:
/phpdoc/en/reference/classobj/functions class-exists.xml
Log:
Fixed a few grammatical oversights, added info on autoload parameter and
functionality changes.
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/classobj/functions/class-exists.xml?r1=1.10&r2=1.11&diff_format=u
Index: phpdoc/en/reference/classobj/functions/class-exists.xml
diff -u phpdoc/en/reference/classobj/functions/class-exists.xml:1.10
phpdoc/en/reference/classobj/functions/class-exists.xml:1.11
--- phpdoc/en/reference/classobj/functions/class-exists.xml:1.10 Wed Jun
20 22:24:16 2007
+++ phpdoc/en/reference/classobj/functions/class-exists.xml Sat Sep 1
10:15:37 2007
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.10 $ -->
+<!-- $Revision: 1.11 $ -->
<refentry xml:id="function.class-exists" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>class_exists</refname>
@@ -13,7 +13,7 @@
<methodparam
choice="opt"><type>bool</type><parameter>autoload</parameter></methodparam>
</methodsynopsis>
<para>
- This function checks if the given class have been defined.
+ This function checks whether or not the given class has been defined.
</para>
</refsect1>
<refsect1 role="parameters">
@@ -24,7 +24,7 @@
<term><parameter>class_name</parameter></term>
<listitem>
<para>
- The class name
+ The class name. The name is matched in a case-insensitive manner.
</para>
</listitem>
</varlistentry>
@@ -32,7 +32,7 @@
<term><parameter>autoload</parameter></term>
<listitem>
<para>
- Whether to call &link.autoload; or not by default
+ Whether or not to call &link.autoload; by default. Defaults to &true;.
</para>
</listitem>
</varlistentry>
@@ -59,9 +59,16 @@
</thead>
<tbody>
<row>
+ <entry>5.0.2</entry>
+ <entry>
+ No longer returns &true; for defined interfaces. Use
+ <function>interface_exists</function>.
+ </entry>
+ </row>
+ <row>
<entry>5.0.0</entry>
<entry>
- The <parameter>autoload</parameter> was added.
+ The <parameter>autoload</parameter> parameter was added.
</entry>
</row>
</tbody>
@@ -77,7 +84,7 @@
<programlisting role="php">
<![CDATA[
<?php
-// Check the class exists before trying to use it
+// Check that the class exists before trying to use it
if (class_exists('MyClass')) {
$myclass = new MyClass();
}
@@ -95,7 +102,7 @@
{
include($class . '.php');
- // Check to see if the include declared the class
+ // Check to see whether the include declared the class
if (!class_exists($class, false)) {
trigger_error("Unable to load class: $class", E_USER_WARNING);
}
@@ -115,6 +122,7 @@
&reftitle.seealso;
<para>
<simplelist>
+ <member><function>function_exists</function></member>
<member><function>interface_exists</function></member>
<member><function>get_declared_classes</function></member>
</simplelist>