示例#1
0
 /**
  * Método de acesso ao Singleton PDOPlugin
  * @return PDOPlugin
  */
 public static function getInstance()
 {
     if (empty(self::$instance)) {
         self::$instance = new PDOPlugin();
     }
     return self::$instance;
 }
示例#2
0
 /**
  * Método de acesso ao Singleton PDOPlugin.
  * @param int Modo de carregamento de conexões
  * @see self::EAGER
  * @see self::LAZY
  * @return PDOPlugin
  */
 public static function getInstance($modo = self::EAGER)
 {
     self::$modo = $modo;
     if (empty(self::$instance)) {
         self::$instance = new PDOPlugin();
     }
     return self::$instance;
 }