| 1 | <?php |
||
| 12 | class Native extends Client |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var bool Whether to use gzip encoding |
||
| 16 | */ |
||
| 17 | public $gzipEnabled; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Constructor |
||
| 21 | * |
||
| 22 | * @return void |
||
|
1 ignored issue
–
show
|
|||
| 23 | */ |
||
| 24 | public function __construct() |
||
| 28 | |||
| 29 | /** |
||
| 30 | * {@inheritdoc} |
||
| 31 | */ |
||
| 32 | public function get($url, $headers = []) |
||
| 36 | |||
| 37 | /** |
||
| 38 | * {@inheritdoc} |
||
| 39 | */ |
||
| 40 | public function post($url, $headers = [], $body = null) |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Decompress given page if applicable |
||
| 47 | * |
||
| 48 | * @param string|bool $content Request's response body or FALSE |
||
| 49 | * @return string|bool |
||
| 50 | */ |
||
| 51 | protected function decompress($content) |
||
| 60 | |||
| 61 | /** |
||
| 62 | * Execute an HTTP request |
||
| 63 | * |
||
| 64 | * @param string $method Request method |
||
| 65 | * @param string $url Request URL |
||
| 66 | * @param string[] $headers Request headers |
||
| 67 | * @return string|bool Response body or FALSE |
||
| 68 | */ |
||
| 69 | protected function request($method, $url, $headers, $body = null) |
||
| 88 | } |
Adding a
@returnannotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.