Mercurial > defr > DualBlog
view includes/class.factory.php @ 78:80bb1ca0114e
Utilisation du chemin complet vers classes.php
Cela permet de lancer le fichier mail_comments.php en ligne de commande via php -f
depuis n'importe quel répertoire (pratique pour le cron)
author | defr@hedwige.defr.net |
---|---|
date | Sun, 13 Jul 2008 15:08:32 +0200 |
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; } }