/** * @param string $dataset * @param string $format * @param string $filter * @param bool $updateExisting * * @return false|string downloaded file content */ public function download($dataset, $format, $filter = null, $updateExisting = false) { $result = false; $parameters = array('dataset' => $dataset, 'format' => $format); if (isset($filter)) { $parameters['q'] = $filter; } $this->client->setTimeout(0); $content = $this->client->get('download', $parameters); $save = $this->finder->save($dataset, $content, $format, $filter, $updateExisting); if (false !== $save) { $result = $this->finder->getContent($save); } return $result; }