From a9bf0ded6c67da574a753430e35e90e842be3dd1 Mon Sep 17 00:00:00 2001 From: Aidan Lister Date: Sat, 30 Oct 2004 03:39:06 +0000 Subject: [PATCH] Better examples git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@171604 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/oop5/patterns.xml | 62 ++++++++++++++++++++++++++------------ 1 file changed, 42 insertions(+), 20 deletions(-) diff --git a/language/oop5/patterns.xml b/language/oop5/patterns.xml index 8e0c08621f..dfcb81e496 100644 --- a/language/oop5/patterns.xml +++ b/language/oop5/patterns.xml @@ -1,5 +1,5 @@ - + Patterns @@ -19,10 +19,9 @@ Defining this method in a class allows drivers to be loaded on the - fly. Loading a MySQL and a + fly. If the Example class was a database + abstraction class, loading a MySQL and SQLite driver could be done as follows: ]]> @@ -69,30 +69,52 @@ $db_sqlite = DB::factory('SQLite'); ]]> - This allows a single instance of any class to be retrieved. - Loading an example DB could be done like so: + This allows a single instance of the Example + class to be retrieved. bark(); + ?> ]]>