downloadAndReturn() публичный Метод

If this class' supportsChunkDownload returns false you should assume that the $from and $to parameters will be ignored.
public downloadAndReturn ( string $url, integer $from = null, integer $to = null, array $params = [] ) : string
$url string The remote file's URL
$from integer Byte range to start downloading from. Use null for start of file.
$to integer Byte range to stop downloading. Use null to download the entire file ($from is ignored)
$params array Additional params that will be added before performing the download
Результат string The raw file data retrieved from the remote URL.
Пример #1
0
 /**
  * @covers  FOF30\Download\Adapter\Curl::downloadAndReturn
  *
  * @dataProvider    FOF30\Tests\Download\Adapter\CurlDataprovider::getTestDownloadAndReturn
  *
  * @param array $config
  * @param array $test
  */
 public function testDownloadAndReturn(array $config, array $test)
 {
     FakeCurl::setUp($config);
     $adapter = new Curl();
     if ($test['exception'] !== false) {
         $this->setExpectedException($test['exception']['name'], $test['exception']['message'], $test['exception']['code']);
     }
     $ret = $adapter->downloadAndReturn($test['url'], $test['from'], $test['to']);
     $retSize = 0;
     if (is_string($ret)) {
         $retSize = strlen($ret);
     }
     $this->assertEquals($test['retSize'], $retSize, $test['message']);
 }