Mercurial > defr > DualBlog
annotate includes/class.factory.php @ 15:3b7c1400f89a
Redirections adaptées à la nouvelle architecture.
author | Franck Deroche <webmaster@defr.org> |
---|---|
date | Fri, 26 Oct 2007 14:36:59 +0200 |
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 |