1 | <?php |
||
12 | class StandardBinaryRequest implements BinaryRequestInterface |
||
13 | { |
||
14 | use EventEmitterTrait; |
||
15 | |||
16 | /** |
||
17 | * @var string |
||
18 | */ |
||
19 | private $url; |
||
20 | |||
21 | /** |
||
22 | * {@inheritdoc} |
||
23 | * |
||
24 | * @param $url |
||
25 | * @return string |
||
26 | */ |
||
27 | public function request($url) |
||
39 | |||
40 | /** |
||
41 | * Callback used when progress is made requesting. |
||
42 | * |
||
43 | * @param $notification_code |
||
44 | * @param $severity |
||
45 | * @param $message |
||
46 | * @param $message_code |
||
47 | * @param $bytes_transferred |
||
48 | * @param $bytes_max |
||
49 | * @return void |
||
50 | */ |
||
51 | public function onNotification($notification_code, $severity, $message, $message_code, $bytes_transferred, $bytes_max) |
||
62 | |||
63 | /** |
||
64 | * Create a context for file_get_contents. |
||
65 | * |
||
66 | * @return resource |
||
67 | */ |
||
68 | protected function getContext() |
||
81 | } |
||
82 |