Mercurial > defr > DualBlog
view includes/class.factory.php @ 16:116ef98b4cb5
L'affichage d'un post unique avec commentaire utilise maintenant les templates aussi.
author | Franck Deroche <webmaster@defr.org> |
---|---|
date | Fri, 26 Oct 2007 16:26:56 +0200 |
parents | ff57b45eda37 |
children | bdf116822fc6 |
line wrap: on
line source
<?php class Factory { private static $db = null; private static $mainTemplate = null; private static $skeleton = null; public static function getDB() { if(is_null(Factory::$db)) Factory::$db = new DataAccess(); return Factory::$db; } public static function getSkeleton() { if(is_null(Factory::$skeleton)) Factory::$skeleton = new Skeleton(); return Factory::$skeleton; } }