/[cvs]/nfo/php/libs/org.netfrag.glib/DesignPattern/Object.php
ViewVC logotype

Annotation of /nfo/php/libs/org.netfrag.glib/DesignPattern/Object.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Mon Feb 3 03:33:48 2003 UTC (21 years, 7 months ago) by joko
Branch: MAIN
+ initial commit

1 joko 1.1 <?
2     // ---------------------------------------------------------------------------
3     // $Id: Site.php,v 1.5 2002/12/23 11:33:58 jonen Exp $
4     // ---------------------------------------------------------------------------
5     // $Log: Site.php,v $
6     // ---------------------------------------------------------------------------
7    
8    
9    
10     /*
11     class DesignPattern_Object {
12     function DesignPattern_Object() {
13    
14     }
15     }
16     */
17    
18     function _ns2file($nsName) {
19     if ($filename = str_replace('::', '/', $nsName)) {
20     $filename .= '.php';
21     return $filename;
22     }
23     }
24    
25     function mkObject($namespacedClassname) {
26     $classname = $namespacedClassname;
27     if (loadModule($namespacedClassname)) {
28     $classname = str_replace('::', '_', $namespacedClassname);
29     }
30     $obj = new DesignPattern_Bridge($classname);
31     return $obj;
32     }
33    
34     function loadModule($namespacedClassname) {
35     if ($filename = _ns2file($namespacedClassname)) {
36     require_once($filename);
37     return 1;
38     }
39     }
40    
41     ?>

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed