Skip to content

Commit

Permalink
atualização readme
Browse files Browse the repository at this point in the history
  • Loading branch information
brunobmorais committed Jun 13, 2022
1 parent c791974 commit c411548
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/DatalayerTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ protected function getObj($prepare=null){
protected function getObjModel($prepare=null, String $class=null){
try {
$prepare = empty($prepare)?$this->prepare:$prepare;
$class = empty($prepare)?$this->classModel:$prepare;
$class = empty($class)?$this->classModel:$class;
$dados = $prepare->fetchAll(PDO::FETCH_CLASS, CONFIG_DATA_LAYER["directory_models"].$class);
$this->resultArray = $dados;
return $dados;
Expand All @@ -136,7 +136,7 @@ protected function getObjModel($prepare=null, String $class=null){
protected function getObjModelID($prepare=null, String $class=null){
try {
$prepare = empty($prepare)?$this->prepare:$prepare;
$class = empty($prepare)?$this->classModel:$prepare;
$class = empty($class)?$this->classModel:$class;
$dados = $prepare->fetchObject(CONFIG_DATA_LAYER["directory_models"].$class);
return $dados;
} catch (PDOException $e) {
Expand Down Expand Up @@ -288,4 +288,3 @@ protected function printErrorInfo()
return $this->getInstance($this->database)->errorInfo();
}
}

0 comments on commit c411548

Please sign in to comment.