Skip to content

Commit 4f47d20

Browse files
authored
Universal namespace and rename Configuration
Removido o prefixo "Devbr"do namespace da classe de configuração (linhas 49 e 50). Acrescentado __NAMESPACE__ constante antes do nome da classe Row, no fetch do PDO (linha 102).
1 parent bc6033e commit 4f47d20

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Database.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ function __construct($config = null)
4646
{
4747
if (is_array($config)) {
4848
$this->config = $config;
49-
} elseif (method_exists('Config\Devbr\Database\Database', 'get')) {
50-
$this->config = \Config\Devbr\Database\Database::get($config);
49+
} elseif (method_exists('Config\Database\Database', 'get')) {
50+
$this->config = \Config\Database\Database::get($config);
5151
} else {
5252
trigger_error('DataBase configurations not found!');
5353
}
@@ -99,7 +99,7 @@ function query($sql, $parms = array(), $alias = null)
9999
$this->error[$sql] = $sth->errorInfo();
100100

101101
if ($sth->columnCount() > 0) {
102-
return $this->result = $sth->fetchAll(PDO::FETCH_CLASS, "Devbr\Row", [$this->sql, $parms]);
102+
return $this->result = $sth->fetchAll(PDO::FETCH_CLASS, __NAMESPACE__.'\Row', [$this->sql, $parms]);
103103
} else {
104104
$this->result = false;
105105
return $this->rows;

0 commit comments

Comments
 (0)