1 | <?php |
||
37 | class Request |
||
38 | { |
||
39 | const REQUEST_TIMEOUT = 15.0; |
||
40 | |||
41 | /** |
||
42 | * If true, SSL does not have to be verified |
||
43 | * |
||
44 | * @var boolean |
||
45 | */ |
||
46 | protected $insecure = false; |
||
47 | |||
48 | /** |
||
49 | * The base URL of the Magento application |
||
50 | * |
||
51 | * @var string|boolean |
||
52 | */ |
||
53 | protected $url; |
||
54 | |||
55 | /** |
||
56 | * Client cache |
||
57 | * |
||
58 | * @var Client |
||
59 | */ |
||
60 | protected $client; |
||
61 | |||
62 | /** |
||
63 | * Initialize request object |
||
64 | * |
||
65 | * @param string $baseUri |
||
66 | * @param boolean $verify |
||
67 | */ |
||
68 | public function __construct($baseUri = false, $verify = true) |
||
80 | |||
81 | /** |
||
82 | * Pass undefined requests to client |
||
83 | * |
||
84 | * @param string $method |
||
85 | * @param arary $args |
||
86 | * |
||
87 | * @return \GuzzleHttp\Psr7\Response |
||
88 | */ |
||
89 | public function __call($method, $args) |
||
102 | |||
103 | /** |
||
104 | * Get the base url of this request |
||
105 | * |
||
106 | * @return string |
||
107 | */ |
||
108 | public function getUrl() |
||
112 | |||
113 | /** |
||
114 | * Manipulate header data into a parsable format |
||
115 | * |
||
116 | * @param string $rawData |
||
117 | * |
||
118 | * @return array |
||
119 | */ |
||
120 | public function parseHeader($rawData) |
||
133 | |||
134 | /** |
||
135 | * Parse out the count from the response |
||
136 | * |
||
137 | * @param string $response |
||
138 | * @param string $pattern |
||
139 | * @param boolean $returnAll |
||
140 | * |
||
141 | * @return string|array|boolean |
||
142 | */ |
||
143 | public function findMatchInResponse($response, $pattern, $returnAll = false) |
||
155 | } |
||
156 |