1 | <?php |
||
28 | class Client implements ClientInterface |
||
29 | { |
||
30 | /** |
||
31 | * @var Url $baseUrl |
||
32 | */ |
||
33 | private $baseUrl; |
||
34 | /** |
||
35 | * @var HttpClientInterface $httpClient |
||
36 | */ |
||
37 | private $httpClient; |
||
38 | /** |
||
39 | * @var PostFileFactoryInterface $postFileFactory |
||
40 | */ |
||
41 | private $postFileFactory; |
||
42 | |||
43 | public function __construct(HttpClientInterface $httpClient, PostFileFactoryInterface $postFileFactory = null) |
||
49 | |||
50 | /** |
||
51 | * {@inheritdoc } |
||
52 | */ |
||
53 | public function get($url, array $queryParameters = []) |
||
57 | |||
58 | /** |
||
59 | * {@inheritdoc } |
||
60 | */ |
||
61 | public function patch($url, array $body) |
||
65 | |||
66 | /** |
||
67 | * {@inheritdoc } |
||
68 | */ |
||
69 | public function put($url, array $body) |
||
73 | |||
74 | /** |
||
75 | * {@inheritdoc } |
||
76 | */ |
||
77 | public function delete($url) |
||
81 | |||
82 | /** |
||
83 | * {@inheritdoc } |
||
84 | */ |
||
85 | public function post($url, $body, array $files = array()) |
||
98 | |||
99 | /** |
||
100 | * {@inheritdoc } |
||
101 | */ |
||
102 | public function getSchemeAndHost() |
||
106 | |||
107 | /** |
||
108 | * @param string $url |
||
109 | * @param null|SubscriberInterface $subscriber |
||
110 | * @param array $options |
||
111 | * @return Client |
||
112 | */ |
||
113 | public static function createFromUrl($url, SubscriberInterface $subscriber = null, array $options = []) |
||
120 | |||
121 | private static function resolveDefaults(array &$options, SubscriberInterface $subscriber = null) |
||
134 | } |
||
135 |