Example #1
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();
     }
 }
Example #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));
     //$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();
     }
 }
Example #3
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();
     }
 }
Example #4
0
 /**
  * PostgreSQL
  */
 private function pgsql()
 {
     $oSQL = new \core\orm\sql\SQLPostgre(new \core\pdo\Conexao(DRIVER, HOST, DBNAME, USERNAME, PASSWD));
     parent::__construct($oSQL);
 }