Beispiel #1
0
 function __construct($username, $driver)
 {
     switch ($driver) {
         case "mysql":
             $this->mysql();
             break;
         case "dblib":
             break;
         case "":
             break;
         case "ibm":
             break;
         case "pgsql":
             break;
         case "sqlite":
             break;
         case "sqlsrv":
             break;
         case "informix":
             break;
         case "oci":
             break;
     }
     #switch
     $this->__set("username", $username);
     parent::get();
 }
Beispiel #2
0
 /**
  * @param string $id
  */
 public function __construct($id = null)
 {
     $oSQL = new \core\orm\sql\SQLMySQL(new \core\pdo\Conexao(DRIVER, HOST, DBNAME, USERNAME, PASSWD));
     parent::__construct($oSQL);
     if (!is_null($id)) {
         $this->__set("idIdioma", $id);
         parent::get();
     }
 }
 /**
  * @param string $id
  */
 public function __construct($id = null)
 {
     $oSQL = new \core\orm\sql\SQLMySQL(new \core\pdo\Conexao(DRIVER, HOST, DBNAME, USERNAME, PASSWD));
     //$oSQL = new \core\orm\SQLPostgre( new \core\pdo\Conexao('pgsql', HOST, 'framework', 'postgres', PASSWD, 5432 ) );
     parent::__construct($oSQL);
     if (!is_null($id)) {
         $this->__set("idPreferencia", $id);
         parent::get();
     }
 }
Beispiel #4
0
 /**
  * @param string $id
  */
 public function __construct($id = null)
 {
     $oSQL = new \core\orm\sql\SQLMySQL(new \core\pdo\Conexao(DRIVER, HOST, DBNAME, USERNAME, PASSWD));
     //$oSQL = new \core\orm\sql\SQLPostgre( new \core\pdo\Conexao('pgsql', HOST, 'framework', 'postgres', PASSWD, 5432 ) );
     parent::__construct($oSQL);
     if (!is_null($id)) {
         # define o atributo identificador
         $this->__set("idTelefone", $id);
         # recupera o objeto
         parent::get();
     }
 }