@@ -73,7 +73,7 @@ class Database extends QueryBuilder
7373
7474 private PDO $ _pdo ;
7575
76- private bool $ isGlobal = false ;
76+ private bool $ _isGlobal = false ;
7777
7878 private static PDO $ _globalPDO ;
7979
@@ -139,15 +139,15 @@ public function __call($name, $arguments)
139139 final public function newInstance (array $ credentials = []): Database
140140 {
141141 $ instance = new Database (empty ($ credentials ) ? $ this ->_credentials : array_merge ($ this ->_credentials , $ credentials ));
142- $ instance ->isGlobal = false ;
142+ $ instance ->_isGlobal = false ;
143143
144144 return $ instance ;
145145 }
146146
147147 final public function clone (): Database
148148 {
149149 $ clone = new self ($ this ->_credentials );
150- $ clone ->isGlobal = $ this ->isGlobal ;
150+ $ clone ->_isGlobal = $ this ->_isGlobal ;
151151
152152 return $ clone ;
153153 }
@@ -191,12 +191,12 @@ final public function getError(): array
191191 final public function connectionAsGlobal (): void
192192 {
193193 self ::$ _globalPDO = $ this ->getPDO ();
194- $ this ->isGlobal = true ;
194+ $ this ->_isGlobal = true ;
195195 }
196196
197- final public function getPDO (): PDO
197+ public function getPDO (): PDO
198198 {
199- if (isset (self ::$ _globalPDO ) && $ this ->isGlobal ){
199+ if (isset (self ::$ _globalPDO ) && $ this ->_isGlobal ){
200200 return self ::$ _globalPDO ;
201201 }
202202 if (!isset ($ this ->_pdo )){
@@ -246,7 +246,7 @@ final public function withPDO(PDO $pdo): self
246246 {
247247 $ with = clone $ this ;
248248 $ with ->_pdo = $ pdo ;
249- $ with ->isGlobal = false ;
249+ $ with ->_isGlobal = false ;
250250
251251 return $ with ;
252252 }
0 commit comments