nlopess Fri Nov 18 06:14:28 2005 EDT
Modified files:
/phpdoc/en/language/oop5 patterns.xml
Log:
fix #33575: the example is a Parameterized Factory
http://cvs.php.net/diff.php/phpdoc/en/language/oop5/patterns.xml?r1=1.7&r2=1.8&ty=u
Index: phpdoc/en/language/oop5/patterns.xml
diff -u phpdoc/en/language/oop5/patterns.xml:1.7
phpdoc/en/language/oop5/patterns.xml:1.8
--- phpdoc/en/language/oop5/patterns.xml:1.7 Sun Feb 13 23:13:13 2005
+++ phpdoc/en/language/oop5/patterns.xml Fri Nov 18 06:14:24 2005
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.7 $ -->
+<!-- $Revision: 1.8 $ -->
<sect1 id="language.oop5.patterns">
<title>Patterns</title>
<para>
@@ -12,16 +12,17 @@
<para>
The Factory pattern allows for the instantiation of objects
at runtime. It is called a Factory Pattern since it is
- responsible for "manufacturing" an object.
+ responsible for "manufacturing" an object. A Parameterized Factory receives
+ the name of the class to instantiate as argument.
</para>
<example>
- <title>Factory Method</title>
+ <title>Parameterized Factory Method</title>
<programlisting role="php">
<![CDATA[
<?php
class Example
{
- // The factory method
+ // The parameterized factory method
public static function factory($type)
{
if (include_once 'Drivers/' . $type . '.php') {