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