view 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
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;
  }
}