Mercurial > defr > DualBlog
view includes/class.factory.php @ 43:1cdb1a68634b
Changement dans la facon dont on choisi le format.
Pour choisir un format, on passe maintenant en query-string
un paramètre dont le nom correspond au nom du format souhaité,
et sans valeur.
Mise à jour du .htaccess en fonction de cette nouvelle
forme de selection.
author | Franck Deroche <webmaster@defr.org> |
---|---|
date | Wed, 14 Nov 2007 17:12:37 +0100 |
parents | bdf116822fc6 |
children |
line wrap: on
line source
<?php class Factory { private static $db = null; private static $mainTemplate = null; private static $skeleton = null; private static $request = 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; } public static function getRequete() { if(is_null(Factory::$request)) Factory::$request = new Requete(); return Factory::$request; } }