public function getObject($query, $object)
    {
        $this->statement = $this->db->query($query);
        if ($this->statement) {
            $this->statement->setFetchMode(\PDO::FETCH_CLASS, $object);
            return $this->statement->fetch();
        }
        return false;
    }
public function getObject($query, $object)
    {
        $this->statement = $this->db->query($query);
        if ($this->statement) {
            $this->statement->setFetchMode(\PDO::FETCH_CLASS, $object);
            return $this->statement->fetch();
        }
        return false;
    }
public function getObject ( $ query , $ object ) { $ this -> statement = $ this -> db -> query ( $ query ) ; if ( $ this -> statement ) { $ this -> statement -> setFetchMode ( \ PDO :: FETCH_CLASS , $ object ) ; return $ this -> statement -> fetch ( ) ; } return false ; }
Get object by sql query

@param string $query  Sql query
@param string $object Object name

@return array|bool
Get object by sql query