Mercurial > defr > DualBlog
view includes/class.factory.php @ 14:ec1453cb74b8
Plus brutal, mais fonctionnel.
Il semblerait que -1 % 12 retourne -1 en PHP, et pas 11...
author | Franck Deroche <webmaster@defr.org> |
---|---|
date | Fri, 26 Oct 2007 14:24:59 +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; } }