@@ -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 | /** |
@@ -108,6 +108,12 @@ |
||
| 108 | 108 | }); |
| 109 | 109 | } |
| 110 | 110 | |
| 111 | + /** |
|
| 112 | + * @param string $origin |
|
| 113 | + * @param string $fileUrl |
|
| 114 | + * @param boolean $progress |
|
| 115 | + * @param \Closure $exec |
|
| 116 | + */ |
|
| 111 | 117 | protected function fetch($origin, $fileUrl, $progress, $options, $exec) |
| 112 | 118 | { |
| 113 | 119 | do { |