1 | <? |
||
8 | class XmlPost extends Model { |
||
9 | |||
10 | /** |
||
11 | * @var Xml|false The request object |
||
12 | */ |
||
13 | public $request = false; |
||
14 | |||
15 | /** |
||
16 | * @var string The URL to which the request should be sent |
||
17 | */ |
||
18 | public $url = ''; |
||
19 | |||
20 | /** |
||
21 | * @var integer The time before a request should be considered as failed |
||
22 | */ |
||
23 | public $timeout = 60; |
||
24 | |||
25 | |||
26 | /** |
||
27 | * @var Xml|false The response object |
||
28 | */ |
||
29 | public $response = false; |
||
30 | |||
31 | /** |
||
32 | * @var string The request document |
||
33 | */ |
||
34 | public $remote_request = ''; |
||
35 | |||
36 | /** |
||
37 | * @var mixed The response document |
||
38 | */ |
||
39 | public $remote_response = ''; |
||
40 | |||
41 | /** |
||
42 | * @var string The response status code |
||
43 | */ |
||
44 | public $remote_status = ''; |
||
45 | |||
46 | /** |
||
47 | * @var string The response status description |
||
48 | */ |
||
49 | public $remote_reason = ''; |
||
50 | |||
51 | /** |
||
52 | * @var boolean Should SSL certificate peer be verified |
||
53 | */ |
||
54 | public $verify_peer = true; |
||
55 | |||
56 | /** |
||
57 | * @var boolean Should SSL certificate host be verified |
||
58 | */ |
||
59 | public $verify_host = true; |
||
60 | |||
61 | |||
62 | /** |
||
63 | * Call by construct |
||
64 | */ |
||
65 | public function init() { |
||
68 | |||
69 | |||
70 | /** |
||
71 | * Reset response variables |
||
72 | */ |
||
73 | public function reset() { |
||
85 | |||
86 | |||
87 | /** |
||
88 | * Send request to remote server and load up the response |
||
89 | * |
||
90 | * @param Xml $request |
||
91 | * @param string $url |
||
92 | * @param integer $timeout |
||
93 | * @return boolean Success |
||
94 | */ |
||
95 | public function process($request = false, $url = false, $timeout = false, $response = false) { |
||
186 | |||
187 | } |
||
188 |