Mercurial > defr > DualBlog
annotate includes/class.factory.php @ 25:8cbb4f4d890b
Ajout (de nouveau) du favicon
| author | Franck Deroche <webmaster@defr.org> | 
|---|---|
| date | Sun, 28 Oct 2007 19:43:38 +0100 | 
| parents | ff57b45eda37 | 
| children | bdf116822fc6 | 
| rev | line source | 
|---|---|
| webmaster@11 | 1 <?php | 
| webmaster@11 | 2 class Factory { | 
| webmaster@11 | 3 private static $db = null; | 
| webmaster@11 | 4 private static $mainTemplate = null; | 
| webmaster@11 | 5 private static $skeleton = null; | 
| webmaster@11 | 6 | 
| webmaster@11 | 7 public static function getDB() { | 
| webmaster@11 | 8 if(is_null(Factory::$db)) | 
| webmaster@11 | 9 Factory::$db = new DataAccess(); | 
| webmaster@11 | 10 return Factory::$db; | 
| webmaster@11 | 11 } | 
| webmaster@11 | 12 | 
| webmaster@11 | 13 public static function getSkeleton() { | 
| webmaster@11 | 14 if(is_null(Factory::$skeleton)) | 
| webmaster@11 | 15 Factory::$skeleton = new Skeleton(); | 
| webmaster@11 | 16 return Factory::$skeleton; | 
| webmaster@11 | 17 } | 
| webmaster@11 | 18 } | 
| webmaster@11 | 19 | 
