2017 © Pedro Peláez
 

library downloader

download file

image

primipilus/downloader

download file

  • Wednesday, January 17, 2018
  • by primipilus
  • Repository
  • 1 Watchers
  • 0 Stars
  • 92 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 6 Versions
  • 28 % Grown

The README.md

Downloader

Composer install

composer require "primipilus/downloader:~2.0"

Usage

try {
    $downloader = \primipilus\downloader\Downloader::getInstance('http', ['temporaryDir' => __DIR__, 'attempts' => 5]);
} catch (BaseException $e) {
}

$client = new FtpClient\FtpClient();
try {
    $downloader = \primipilus\downloader\Downloader::getInstance('ftp', ['temporaryDir' => __DIR__, 'attempts' => 5, 'client' => $client]);
} catch (BaseException $e) {
}

if ($downloader) {
    $file = $downloader->downloadFile($fileFrom);

    echo $file->getOriginal(), PHP_EOL;
    echo $file->getInfo()->path, PHP_EOL;
    echo $file->getInfo()->basename, PHP_EOL;
    echo $file->getInfo()->filename, PHP_EOL;
    echo $file->getInfo()->extension, PHP_EOL;
    if ($file->getInfo()->isImage) {
        echo $file->getInfo()->image->width . ' px', PHP_EOL;
        echo $file->getInfo()->image->height . ' px', PHP_EOL;
    }
}

The Versions

17/01 2018

dev-master

9999999-dev https://github.com/primipilus/downloader

download file

  Sources   Download

MIT

The Requires

 

by Leonid Gushchin

download download file http download

17/01 2018

v2.0.2

2.0.2.0 https://github.com/primipilus/downloader

download file

  Sources   Download

MIT

The Requires

 

by Leonid Gushchin

download download file http download

13/07 2017

v2.0.1

2.0.1.0 https://github.com/primipilus/downloader

download file

  Sources   Download

MIT

The Requires

 

by Leonid Gushchin

download download file http download

22/06 2017

v2.0.0

2.0.0.0 https://github.com/primipilus/downloader

download file

  Sources   Download

MIT

The Requires

 

by Leonid Gushchin

download download file http download

24/10 2016

v1.0.1

1.0.1.0 https://github.com/primipilus/downloader

download file

  Sources   Download

MIT

The Requires

 

by Leonid Gushchin

download download file http download

24/10 2016

v1.0.0

1.0.0.0 https://github.com/primipilus/downloader

download file

  Sources   Download

MIT

The Requires

 

by Leonid Gushchin

download download file http download