コード例 #1
0
 public function testConstruct()
 {
     $dataset = uniqid();
     $format = uniqid();
     $download = new Download($dataset, $format);
     $this->assertEquals($dataset, $download->getDataset());
     $this->assertEquals($format, $download->getFormat());
     $this->assertCount(2, $download->getParameters());
 }
コード例 #2
0
 /**
  * @param Download $download
  *
  * @return null|string
  */
 public function getLocalDatasetContent(Download $download)
 {
     $content = null;
     $filepath = $this->finder->findDataset($download->getDataset(), $download->getFormat(), $download->getFilter());
     if (false !== $filepath) {
         $content = $this->finder->getContent($filepath);
     }
     return $content;
 }