예제 #1
0
 /**
  * Regarde si un objet connexion a déjà été instancier,
  * si c'est le cas alors il retourne l'objet déjà existant
  * sinon il en créer un autre.
  * @return $instance
  */
 public static function getInstance()
 {
     if (!self::$instance instanceof self) {
         self::$instance = new self();
     }
     return self::$instance;
 }
예제 #2
0
 /**
  *
  * Return Config instance or create intitial instance
  *
  * @access public
  *
  * @return object
  *
  */
 public static function getInstance()
 {
     if (is_null(self::$instance)) {
         self::$instance = new configuration();
     }
     return self::$instance;
 }