Daniia/Daniia.php
private function connection() {
      $this->apply_config_db();
      try {
         if ( @$_ENV["daniia_connection"] && !$this->id_conn ) {
            $this->id_conn = $_ENV["daniia_connection"];
         }
         elseif ( !$this->id_conn ) {
            $this->id_conn = new \PDO($this->dsn, $this->user, $this->pass);
         }
      } catch (\PDOException $e) {
         die("Error: " . $e->getMessage() . "<br/>");
      }

      $this->get_instance();
      return $this;
   }
private function connection() {
      $this->apply_config_db();
      try {
         if ( @$_ENV["daniia_connection"] && !$this->id_conn ) {
            $this->id_conn = $_ENV["daniia_connection"];
         }
         elseif ( !$this->id_conn ) {
            $this->id_conn = new \PDO($this->dsn, $this->user, $this->pass);
         }
      } catch (\PDOException $e) {
         die("Error: " . $e->getMessage() . "<br/>");
      }

      $this->get_instance();
      return $this;
   }
private function connection ( ) { $ this -> apply_config_db ( ) ; try { if ( @ $ _ENV [ "daniia_connection" ] && ! $ this -> id_conn ) { $ this -> id_conn = $ _ENV [ "daniia_connection" ] ; } elseif ( ! $ this -> id_conn ) { $ this -> id_conn = new \ PDO ( $ this -> dsn , $ this -> user , $ this -> pass ) ; } } catch ( \ PDOException $ e ) { die ( "Error: " . $ e -> getMessage ( ) . "<br/>" ) ; } $ this -> get_instance ( ) ; return $ this ; }
Establese la coneccion a la Base de Datdos
@author Carlos Garcia
@return Object
Establese la coneccion a la Base de Datdos