/** * Método de acesso ao Singleton PDOPlugin * @return PDOPlugin */ public static function getInstance() { if (empty(self::$instance)) { self::$instance = new PDOPlugin(); } return self::$instance; }
/** * 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; }