public static function singleton() { if (self::$instance == null) { self::$instance = new self(); } return self::$instance; }
/** * Crée et retourne l'objet SPDO * * @access public * @static * @param void * @return SPDO $instance */ public static function getInstance() { if (is_null(self::$instance)) { self::$instance = new SPDO(); } return self::$instance; }
public static function singleton() { if (self::$instance == null) { $config = Config::singleton(); if ($config->get('dbname') != '' or $config->get('dbuser') != '') { self::$instance = new self(); } else { return false; } } return self::$instance; }