@@ -60,6 +60,9 @@ discard block |
||
| 60 | 60 | } |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | + /** |
|
| 64 | + * @param string $url |
|
| 65 | + */ |
|
| 63 | 66 | public function importURL($url) |
| 64 | 67 | { |
| 65 | 68 | $struct = parse_url($url); |
@@ -78,6 +81,11 @@ discard block |
||
| 78 | 81 | } |
| 79 | 82 | |
| 80 | 83 | // utility for __construct |
| 84 | + |
|
| 85 | + /** |
|
| 86 | + * @param string $key |
|
| 87 | + * @param string $default |
|
| 88 | + */ |
|
| 81 | 89 | private static function setOr(array $struct, $key, $default=null) |
| 82 | 90 | { |
| 83 | 91 | if (!empty($struct[$key])) { |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * hirak/prestissimo |
|
| 4 | - * @author Hiraku NAKANO |
|
| 5 | - * @license MIT https://github.com/hirak/prestissimo |
|
| 6 | - */ |
|
| 3 | + * hirak/prestissimo |
|
| 4 | + * @author Hiraku NAKANO |
|
| 5 | + * @license MIT https://github.com/hirak/prestissimo |
|
| 6 | + */ |
|
| 7 | 7 | namespace Hirak\Prestissimo; |
| 8 | 8 | |
| 9 | 9 | /** |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | /** |
| 89 | 89 | * Get the content. |
| 90 | 90 | * |
| 91 | - * @param string $originUrl The origin URL |
|
| 91 | + * @param string $origin The origin URL |
|
| 92 | 92 | * @param string $fileUrl The file URL |
| 93 | 93 | * @param bool $progress Display the progression |
| 94 | 94 | * @param array $options Additional context options |
@@ -108,6 +108,11 @@ discard block |
||
| 108 | 108 | }); |
| 109 | 109 | } |
| 110 | 110 | |
| 111 | + /** |
|
| 112 | + * @param string $fileUrl |
|
| 113 | + * @param boolean $progress |
|
| 114 | + * @param \Closure $exec |
|
| 115 | + */ |
|
| 111 | 116 | protected function fetch($origin, $fileUrl, $progress, $options, $exec) |
| 112 | 117 | { |
| 113 | 118 | do { |
@@ -222,11 +227,6 @@ discard block |
||
| 222 | 227 | |
| 223 | 228 | /** |
| 224 | 229 | * @internal |
| 225 | - * @param resource $ch |
|
| 226 | - * @param int $downBytesMax |
|
| 227 | - * @param int $downBytes |
|
| 228 | - * @param int $upBytesMax |
|
| 229 | - * @param int $upBytes |
|
| 230 | 230 | */ |
| 231 | 231 | public function progress() |
| 232 | 232 | { |