cvs: phpdoc /en/language/oop5 reflection.xml
| From: | Nilgün Belma Bugüner | Date: | Tue, 04 Nov 2008 15:49:11 +0000 |
| Subject: | cvs: phpdoc /en/language/oop5 reflection.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-2372@lists.php.net to get a copy of this message | ||
nilgun Tue Nov 4 15:49:11 2008 UTC
Modified files:
/phpdoc/en/language/oop5 reflection.xml
Log:
fixed a typo
http://cvs.php.net/viewvc.cgi/phpdoc/en/language/oop5/reflection.xml?r1=1.38&r2=1.39&diff_format=u
Index: phpdoc/en/language/oop5/reflection.xml
diff -u phpdoc/en/language/oop5/reflection.xml:1.38 phpdoc/en/language/oop5/reflection.xml:1.39
--- phpdoc/en/language/oop5/reflection.xml:1.38 Fri Aug 29 16:42:19 2008
+++ phpdoc/en/language/oop5/reflection.xml Tue Nov 4 15:49:10 2008
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.38 $ -->
+<!-- $Revision: 1.39 $ -->
<sect1 xml:id="language.oop5.reflection" xmlns="http://docbook.org/ns/docbook">
<title>Reflection</title>
<sect2 xml:id="language.oop5.reflection.toc">
@@ -23,7 +23,7 @@
<para>
PHP 5 comes with a complete reflection API that adds the ability to
reverse-engineer classes, interfaces, functions and methods as well
- as extensions. Additionally, the reflection API also offers ways of
+ as extensions. Additionally, the reflection API also offers ways of
retrieving doc comments for functions, classes and methods.
</para>
<para>
@@ -222,7 +222,7 @@
*
* @return int
*/
-function counter()
+function counter()
{
static $c = 0;
return $c++;
@@ -317,8 +317,8 @@
</note>
<para>
To introspect function parameters, you will first have to create an instance
- of the <classname>ReflectionFunction</classname> or
- <classname>ReflectionMethod</classname> classes and then use their
+ of the <classname>ReflectionFunction</classname> or
+ <classname>ReflectionMethod</classname> classes and then use their
<function>getParameters</function> method to retrieve an array of parameters.
</para>
<example>
@@ -332,7 +332,7 @@
function abc() { }
// Create an instance of ReflectionFunction with the
-// parameter given from the command line.
+// parameter given from the command line.
$reflect = new ReflectionFunction($argv[1]);
echo $reflect;
@@ -447,7 +447,7 @@
/**
* A counter class
*/
-class Counter extends Object implements Serializable
+class Counter extends Object implements Serializable
{
const START = 0;
private static $c = Counter::START;
@@ -504,7 +504,7 @@
if ($class->isInstantiable()) {
$counter = $class->newInstance();
- echo '---> $counter is instance? ';
+ echo '---> $counter is instance? ';
echo $class->isInstance($counter) ? 'yes' : 'no';
echo "\n---> new Object() is instance? ";
@@ -524,7 +524,7 @@
<note>
<simpara>
<literal>$class = new ReflectionClass('Foo');
$class->isInstance($arg)</literal>
- is equivalent to <literal>$arg instanceof Foo</literal> or
+ is equivalent to <literal>$arg instanceof Foo</literal> or
<literal>is_a($arg, 'Foo')</literal>.
</simpara>
</note>
@@ -680,7 +680,7 @@
echo "Hello World!\n";
}
}
-
+
$class = new ReflectionClass('Example');
$method = $class->getMethod('printer');
$closure = $method->getClosure(); /* As of PHP 5.3.0 */
@@ -700,7 +700,7 @@
<note>
<simpara>
For static methods as seen above, you should pass NULL as the first
- argument to <function>invoke</function>. For non-static methods, pass
+ argument to <function>invoke</function>. For non-static methods, pass
an instance of the class.
</simpara>
</note>
@@ -867,7 +867,7 @@
<programlisting role='php'>
<![CDATA[
<?php
-// Create an instance of the ReflectionProperty class
+// Create an instance of the ReflectionExtension class
$ext = new ReflectionExtension('standard');
// Print out basic information
@@ -959,7 +959,7 @@
</note>
</sect2>
</sect1>
-
+
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml