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

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

@return array|bool
Get objects by sql query