src/Database/AbstractModel.php
private function addingAttribute(\stdClass $obj, array $elements, int $dataKey)
    {
        foreach ($elements as $name => $value) {
            try {
                $obj->$name = is_callable($value) ? $value($this->rawData[$dataKey]) : $value;
            } catch (\Exception $ex) {
                throw new \Exception("Could not process attribute {$name}");
            }
        }
        return $obj;
    }
private function addingAttribute(\stdClass $obj, array $elements, int $dataKey)
    {
        foreach ($elements as $name => $value) {
            try {
                $obj->$name = is_callable($value) ? $value($this->rawData[$dataKey]) : $value;
            } catch (\Exception $ex) {
                throw new \Exception("Could not process attribute {$name}");
            }
        }
        return $obj;
    }
private function addingAttribute ( \ stdClass $ obj , array $ elements , int $ dataKey ) { foreach ( $ elements as $ name => $ value ) { try { $ obj -> $ name = is_callable ( $ value ) ? $ value ( $ this -> rawData [ $ dataKey ] ) : $ value ; } catch ( \ Exception $ ex ) { throw new \ Exception ( "Could not process attribute {$name}" ) ; } } return $ obj ; }
Adding new attributes into results for response

@author Edson B S Monteiro <bruno.monteirodg@gmail.com>
@since 1.0
@param \stdClass $obj
@param array $elements
@param int $dataKey
@return \stdClass
@throws \Exception
Adding new attributes into results for response