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