nattreid/downloader

Downloader for Nette Framework

1.1.1 2017-09-14 08:29 UTC

README

Nastavení v config.neon

extensions:
    - NAttreid\Downloader\DI\DownloaderExtension

Použití

/** @var \NAttreid\Downloader\IDownloaderFactory */
private $downloaderFactory;

function download() {
    $downloader = $this->downloaderFactory->create();
    $downloader->index = TRUE; // porovnava hlavicku stahnutych souboru s originaly a pokud se shoduji, nic nestahuje
    $downloader->download([
        'http://zdrojovaAdresa' => 'cilovySoubor'
    ]);
}