forked from JetBrains/phpstorm-stubs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
http.php
3222 lines (2854 loc) · 89.3 KB
/
http.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
// Start of http v.1.6.6
class HttpException extends Exception {
public $innerException;
}
class HttpRuntimeException extends HttpException {
}
class HttpInvalidParamException extends HttpException {
}
class HttpHeaderException extends HttpException {
}
class HttpMalformedHeadersException extends HttpException {
}
class HttpRequestMethodException extends HttpException {
}
class HttpMessageTypeException extends HttpException {
}
class HttpEncodingException extends HttpException {
}
class HttpRequestException extends HttpException {
}
class HttpRequestPoolException extends HttpException {
}
class HttpSocketException extends HttpException {
}
class HttpResponseException extends HttpException {
}
class HttpUrlException extends HttpException {
}
class HttpQueryStringException extends HttpException {
}
/**
* @link http://php.net/manual/en/class.httpdeflatestream.php
*/
class HttpDeflateStream {
const TYPE_GZIP = 16;
const TYPE_ZLIB = 0;
const TYPE_RAW = 32;
const LEVEL_DEF = 0;
const LEVEL_MIN = 1;
const LEVEL_MAX = 9;
const STRATEGY_DEF = 0;
const STRATEGY_FILT = 256;
const STRATEGY_HUFF = 512;
const STRATEGY_RLE = 768;
const STRATEGY_FIXED = 1024;
const FLUSH_NONE = 0;
const FLUSH_SYNC = 1048576;
const FLUSH_FULL = 2097152;
/**
* (PECL pecl_http >= 0.21.0)<br/>
* HttpDeflateStream class constructor
* @link http://php.net/manual/en/function.httpdeflatestream-construct.php
* @param int $flags [optional] <p>
* initialization flags
* </p>
* @return void
*/
public function __construct ($flags = null) {}
/**
* (PECL pecl_http >= 0.21.0)<br/>
* Update deflate stream
* @link http://php.net/manual/en/function.httpdeflatestream-update.php
* @param string $data <p>
* data to deflate
* </p>
* @return string deflated data on success or false on failure.
*/
public function update ($data) {}
/**
* (PECL pecl_http >= 0.21.0)<br/>
* Flush deflate stream
* @link http://php.net/manual/en/function.httpdeflatestream-flush.php
* @param string $data [optional] <p>
* more data to deflate
* </p>
* @return string some deflated data as string on success or false on failure.
*/
public function flush ($data = null) {}
/**
* (PECL pecl_http >= 0.21.0)<br/>
* Finalize deflate stream
* @link http://php.net/manual/en/function.httpdeflatestream-finish.php
* @param string $data [optional] <p>
* data to deflate
* </p>
* @return string the final part of deflated data.
*/
public function finish ($data = null) {}
/**
* (PECL pecl_http >= 1.4.0)<br/>
* HttpDeflateStream class factory
* @link http://php.net/manual/en/function.httpdeflatestream-factory.php
* @param int $flags [optional] <p>
* initialization flags
* </p>
* @param string $class_name [optional] <p>
* name of a subclass of HttpDeflateStream
* </p>
* @return HttpDeflateStream
*/
public static function factory ($flags = null, $class_name = null) {}
}
/**
* @link http://php.net/manual/en/class.httpinflatestream.php
*/
class HttpInflateStream {
const FLUSH_NONE = 0;
const FLUSH_SYNC = 1048576;
const FLUSH_FULL = 2097152;
/**
* (PECL pecl_http >= 1.0.0)<br/>
* HttpInflateStream class constructor
* @link http://php.net/manual/en/function.httpinflatestream-construct.php
* @param int $flags [optional] <p>
* initialization flags
* </p>
* @return void
*/
public function __construct ($flags = null) {}
/**
* (PECL pecl_http >= 0.21.0)<br/>
* Update inflate stream
* @link http://php.net/manual/en/function.httpinflatestream-update.php
* @param string $data <p>
* data to inflate
* </p>
* @return string inflated data on success or false on failure.
*/
public function update ($data) {}
/**
* (PECL pecl_http >= 0.21.0)<br/>
* Flush inflate stream
* @link http://php.net/manual/en/function.httpinflatestream-flush.php
* @param string $data [optional] <p>
* more data to inflate
* </p>
* @return string some inflated data as string on success or false on failure.
*/
public function flush ($data = null) {}
/**
* (PECL pecl_http >= 0.21.0)<br/>
* Finalize inflate stream
* @link http://php.net/manual/en/function.httpinflatestream-finish.php
* @param string $data [optional] <p>
* data to inflate
* </p>
* @return string the final part of inflated data.
*/
public function finish ($data = null) {}
/**
* (PECL pecl_http >= 1.4.0)<br/>
* HttpInflateStream class factory
* @link http://php.net/manual/en/function.httpinflatestream-factory.php
* @param int $flags [optional] <p>
* initialization flags
* </p>
* @param string $class_name [optional] <p>
* name of a subclass of HttpInflateStream
* </p>
* @return HttpInflateStream
*/
public static function factory ($flags = null, $class_name = null) {}
}
/**
* @link http://php.net/manual/en/class.httpmessage.php
*/
class HttpMessage implements Countable, Serializable, Iterator, Traversable {
const TYPE_NONE = 0;
const TYPE_REQUEST = 1;
const TYPE_RESPONSE = 2;
protected $type;
protected $body;
protected $requestMethod;
protected $requestUrl;
protected $responseStatus;
protected $responseCode;
protected $httpVersion;
protected $headers;
protected $parentMessage;
/**
* (PECL pecl_http >= 0.10.0)<br/>
* HttpMessage constructor
* @link http://php.net/manual/en/function.httpmessage-construct.php
* @param string $message [optional] <p>
* a single or several consecutive HTTP messages
* </p>
* @return void
*/
public function __construct ($message = null) {}
/**
* (PECL pecl_http >= 0.10.0)<br/>
* Get message body
* @link http://php.net/manual/en/function.httpmessage-getbody.php
* @return string the message body as string.
*/
public function getBody () {}
/**
* (PECL pecl_http >= 0.14.0)<br/>
* Set message body
* @link http://php.net/manual/en/function.httpmessage-setbody.php
* @param string $body <p>
* the new body of the message
* </p>
* @return void
*/
public function setBody ($body) {}
/**
* (PECL pecl_http >= 1.1.0)<br/>
* Get header
* @link http://php.net/manual/en/function.httpmessage-getheader.php
* @param string $header <p>
* header name
* </p>
* @return string the header value on success or NULL if the header does not exist.
*/
public function getHeader ($header) {}
/**
* (PECL pecl_http >= 0.10.0)<br/>
* Get message headers
* @link http://php.net/manual/en/function.httpmessage-getheaders.php
* @return array an associative array containing the messages HTTP headers.
*/
public function getHeaders () {}
/**
* (PECL pecl_http >= 0.10.0)<br/>
* Set headers
* @link http://php.net/manual/en/function.httpmessage-setheaders.php
* @param array $headers <p>
* associative array containing the new HTTP headers, which will replace all previous HTTP headers of the message
* </p>
* @return void
*/
public function setHeaders ($headersarray ) {}
/**
* (PECL pecl_http >= 0.10.0)<br/>
* Add headers
* @link http://php.net/manual/en/function.httpmessage-addheaders.php
* @param array $headers <p>
* associative array containing the additional HTTP headers to add to the messages existing headers
* </p>
* @param bool $append [optional] <p>
* if true, and a header with the same name of one to add exists already, this respective
* header will be converted to an array containing both header values, otherwise
* it will be overwritten with the new header value
* </p>
* @return void true on success or false on failure.
*/
public function addHeaders ($headersarray , $append = null) {}
/**
* (PECL pecl_http >= 0.10.0)<br/>
* Get message type
* @link http://php.net/manual/en/function.httpmessage-gettype.php
* @return int the HttpMessage::TYPE.
*/
public function getType () {}
/**
* (PECL pecl_http >= 0.10.0)<br/>
* Set message type
* @link http://php.net/manual/en/function.httpmessage-settype.php
* @param int $type <p>
* the HttpMessage::TYPE
* </p>
* @return void
*/
public function setType ($type) {}
public function getInfo () {}
/**
* @param $http_info
*/
public function setInfo ($http_info) {}
/**
* (PECL pecl_http >= 0.10.0)<br/>
* Get response code
* @link http://php.net/manual/en/function.httpmessage-getresponsecode.php
* @return int the HTTP response code if the message is of type HttpMessage::TYPE_RESPONSE, else FALSE.
*/
public function getResponseCode () {}
/**
* (PECL pecl_http >= 0.10.0)<br/>
* Set response code
* @link http://php.net/manual/en/function.httpmessage-setresponsecode.php
* @param int $code <p>
* HTTP response code
* </p>
* @return bool TRUE on success, or FALSE if the message is not of type
* HttpMessage::TYPE_RESPONSE or the response code is out of range (100-510).
*/
public function setResponseCode ($code) {}
/**
* (PECL pecl_http >= 0.23.0)<br/>
* Get response status
* @link http://php.net/manual/en/function.httpmessage-getresponsestatus.php
* @return string the HTTP response status string if the message is of type
* HttpMessage::TYPE_RESPONSE, else FALSE.
*/
public function getResponseStatus () {}
/**
* (PECL pecl_http >= 0.23.0)<br/>
* Set response status
* @link http://php.net/manual/en/function.httpmessage-setresponsestatus.php
* @param string $status <p>
* the response status text
* </p>
* @return bool TRUE on success or FALSE if the message is not of type
* HttpMessage::TYPE_RESPONSE.
*/
public function setResponseStatus ($status) {}
/**
* (PECL pecl_http >= 0.10.0)<br/>
* Get request method
* @link http://php.net/manual/en/function.httpmessage-getrequestmethod.php
* @return string the request method name on success, or FALSE if the message is
* not of type HttpMessage::TYPE_REQUEST.
*/
public function getRequestMethod () {}
/**
* (PECL pecl_http >= 0.10.0)<br/>
* Set request method
* @link http://php.net/manual/en/function.httpmessage-setrequestmethod.php
* @param string $method <p>
* the request method name
* </p>
* @return bool TRUE on success, or FALSE if the message is not of type
* HttpMessage::TYPE_REQUEST or an invalid request method was supplied.
*/
public function setRequestMethod ($method) {}
/**
* (PECL pecl_http >= 0.21.0)<br/>
* Get request URL
* @link http://php.net/manual/en/function.httpmessage-getrequesturl.php
* @return string the request URL as string on success, or FALSE if the message
* is not of type HttpMessage::TYPE_REQUEST.
*/
public function getRequestUrl () {}
/**
* (PECL pecl_http >= 0.21.0)<br/>
* Set request URL
* @link http://php.net/manual/en/function.httpmessage-setrequesturl.php
* @param string $url <p>
* the request URL
* </p>
* @return bool TRUE on success, or FALSE if the message is not of type
* HttpMessage::TYPE_REQUEST or supplied URL was empty.
*/
public function setRequestUrl ($url) {}
/**
* (PECL pecl_http >= 0.10.0)<br/>
* Get HTTP version
* @link http://php.net/manual/en/function.httpmessage-gethttpversion.php
* @return string the HTTP protocol version as string.
*/
public function getHttpVersion () {}
/**
* (PECL pecl_http >= 0.10.0)<br/>
* Set HTTP version
* @link http://php.net/manual/en/function.httpmessage-sethttpversion.php
* @param string $version <p>
* the HTTP protocol version
* </p>
* @return bool TRUE on success, or FALSE if supplied version is out of range (1.0/1.1).
*/
public function setHttpVersion ($version) {}
/**
* (PECL pecl_http >= 1.0.0)<br/>
* Guess content type
* @link http://php.net/manual/en/function.httpmessage-guesscontenttype.php
* @param string $magic_file <p>
* the magic.mime database to use
* </p>
* @param int $magic_mode [optional] <p>
* flags for libmagic
* </p>
* @return string the guessed content type on success or false on failure.
*/
public function guessContentType ($magic_file, $magic_mode = null) {}
/**
* (PECL pecl_http >= 0.10.0)<br/>
* Get parent message
* @link http://php.net/manual/en/function.httpmessage-getparentmessage.php
* @return HttpMessage the parent HttpMessage object.
*/
public function getParentMessage () {}
/**
* (PECL pecl_http >= 0.10.0)<br/>
* Send message
* @link http://php.net/manual/en/function.httpmessage-send.php
* @return bool true on success or false on failure.
*/
public function send () {}
/**
* (PECL pecl_http >= 0.10.0)<br/>
* Get string representation
* @link http://php.net/manual/en/function.httpmessage-tostring.php
* @param bool $include_parent [optional] <p>
* specifies whether the returned string should also contain any parent messages
* </p>
* @return string the message as string.
*/
public function toString ($include_parent = null) {}
/**
* (PECL pecl_http >= 0.22.0)<br/>
* Create HTTP object regarding message type
* @link http://php.net/manual/en/function.httpmessage-tomessagetypeobject.php
* @return HttpRequest|HttpResponse either an HttpRequest or HttpResponse object on success, or NULL on failure.
*/
public function toMessageTypeObject () {}
public function count () {}
public function serialize () {}
/**
* @param $serialized
*/
public function unserialize ($serialized) {}
public function rewind () {}
public function valid () {}
public function current () {}
public function key () {}
public function next () {}
public function __toString () {}
/**
* (PECL pecl_http >= 1.4.0)<br/>
* Create HttpMessage from string
* @link http://php.net/manual/en/function.httpmessage-factory.php
* @param string $raw_message [optional] <p>
* a single or several consecutive HTTP messages
* </p>
* @param string $class_name [optional] <p>
* a class extending HttpMessage
* </p>
* @return HttpMessage an HttpMessage object on success or NULL on failure.
*/
public static function factory ($raw_message = null, $class_name = null) {}
/**
* (PECL pecl_http 0.10.0-1.3.3)<br/>
* Create HttpMessage from string
* @link http://php.net/manual/en/function.httpmessage-fromstring.php
* @param string $raw_message [optional] <p>
* a single or several consecutive HTTP messages
* </p>
* @param string $class_name [optional] <p>
* a class extending HttpMessage
* </p>
* @return HttpMessage an HttpMessage object on success or NULL on failure.
*/
public static function fromString ($raw_message = null, $class_name = null) {}
/**
* (PECL pecl_http >= 1.5.0)<br/>
* Create HttpMessage from environment
* @link http://php.net/manual/en/function.httpmessage-fromenv.php
* @param int $message_type <p>
* The message type. See HttpMessage type constants.
* </p>
* @param string $class_name [optional] <p>
* a class extending HttpMessage
* </p>
* @return HttpMessage an HttpMessage object on success or NULL on failure.
*/
public static function fromEnv ($message_type, $class_name = null) {}
/**
* (PECL pecl_http >= 0.22.0)<br/>
* Detach HttpMessage
* @link http://php.net/manual/en/function.httpmessage-detach.php
* @return HttpMessage detached HttpMessage object copy.
*/
public function detach () {}
/**
* (PECL pecl_http >= 0.22.0)<br/>
* Prepend message(s)
* @link http://php.net/manual/en/function.httpmessage-prepend.php
* @param HttpMessage $message <p>
* HttpMessage object to prepend
* </p>
* @param bool $top [optional] <p>
* whether to prepend to the top most or right this message
* </p>
* @return void
*/
public function prepend ($messageHttpMessage , $top = null) {}
/**
* (PECL pecl_http >= 0.23.0)<br/>
* Reverse message chain
* @link http://php.net/manual/en/function.httpmessage-reverse.php
* @return HttpMessage the most parent HttpMessage object.
*/
public function reverse () {}
}
/**
* @link http://php.net/manual/en/class.httpquerystring.php
*/
class HttpQueryString implements Serializable, ArrayAccess {
const TYPE_BOOL = 3;
const TYPE_INT = 1;
const TYPE_FLOAT = 2;
const TYPE_STRING = 6;
const TYPE_ARRAY = 4;
const TYPE_OBJECT = 5;
private static $instance;
private $queryArray;
private $queryString;
/**
* (PECL pecl_http >= 0.22.0)<br/>
* HttpQueryString constructor
* @link http://php.net/manual/en/function.httpquerystring-construct.php
* @param bool $global [optional] <p>
* whether to operate on $_GET and
* $_SERVER['QUERY_STRING']
* </p>
* @param mixed $add [optional] <p>
* additional/initial query string parameters
* </p>
* @return void
*/
final public function __construct ($global = null, $add = null) {}
/**
* (PECL pecl_http >= 0.22.0)<br/>
* Get query string as array
* @link http://php.net/manual/en/function.httpquerystring-toarray.php
* @return array the array representation of the query string.
*/
public function toArray () {}
/**
* (PECL pecl_http >= 0.22.0)<br/>
* Get query string
* @link http://php.net/manual/en/function.httpquerystring-tostring.php
* @return string the string representation of the query string.
*/
public function toString () {}
public function __toString () {}
/**
* (PECL pecl_http >= 0.22.0)<br/>
* Get (part of) query string
* @link http://php.net/manual/en/function.httpquerystring-get.php
* @param string $key [optional] <p>
* key of the query string param to retrieve
* </p>
* @param mixed $type [optional] <p>
* which variable type to enforce
* </p>
* @param mixed $defval [optional] <p>
* default value if key does not exist
* </p>
* @param bool $delete [optional] <p>
* whether to remove the key/value pair from the query string
* </p>
* @return mixed the value of the query string param or the whole query string if no key was specified on success or defval if key does not exist.
*/
public function get ($key = null, $type = null, $defval = null, $delete = null) {}
/**
* (PECL pecl_http >= 0.22.0)<br/>
* Set query string params
* @link http://php.net/manual/en/function.httpquerystring-set.php
* @param mixed $params <p>
* query string params to add
* </p>
* @return string the current query string.
*/
public function set ($params) {}
/**
* (PECL pecl_http >= 1.1.0)<br/>
* Modifiy query string copy
* @link http://php.net/manual/en/function.httpquerystring-mod.php
* @param mixed $params <p>
* query string params to add
* </p>
* @return HttpQueryString a new HttpQueryString object
*/
public function mod ($params) {}
/**
* @param $name
* @param $defval [optional]
* @param $delete [optional]
*/
public function getBool ($name, $defval, $delete) {}
/**
* @param $name
* @param $defval [optional]
* @param $delete [optional]
*/
public function getInt ($name, $defval, $delete) {}
/**
* @param $name
* @param $defval [optional]
* @param $delete [optional]
*/
public function getFloat ($name, $defval, $delete) {}
/**
* @param $name
* @param $defval [optional]
* @param $delete [optional]
*/
public function getString ($name, $defval, $delete) {}
/**
* @param $name
* @param $defval [optional]
* @param $delete [optional]
*/
public function getArray ($name, $defval, $delete) {}
/**
* @param $name
* @param $defval [optional]
* @param $delete [optional]
*/
public function getObject ($name, $defval, $delete) {}
/**
* @param $global [optional]
* @param $params [optional]
* @param $class_name [optional]
*/
public static function factory ($global, $params, $class_name) {}
/**
* (PECL pecl_http >= 0.25.0)<br/>
* HttpQueryString singleton
* @link http://php.net/manual/en/function.httpquerystring-singleton.php
* @param bool $global [optional] <p>
* whether to operate on $_GET and
* $_SERVER['QUERY_STRING']
* </p>
* @return HttpQueryString always the same HttpQueryString instance regarding the global setting.
*/
public static function singleton ($global = null) {}
/**
* (PECL pecl_http >= 0.25.0)<br/>
* Change query strings charset
* @link http://php.net/manual/en/function.httpquerystring-xlate.php
* @param string $ie <p>
* input encoding
* </p>
* @param string $oe <p>
* output encoding
* </p>
* @return bool true on success or false on failure.
*/
public function xlate ($ie, $oe) {}
public function serialize () {}
/**
* @param $serialized
*/
public function unserialize ($serialized) {}
/**
* @param $offset
*/
public function offsetGet ($offset) {}
/**
* @param $offset
* @param $value
*/
public function offsetSet ($offset, $value) {}
/**
* @param $offset
*/
public function offsetExists ($offset) {}
/**
* @param $offset
*/
public function offsetUnset ($offset) {}
}
/**
* @link http://php.net/manual/en/class.httprequest.php
*/
class HttpRequest {
const METH_GET = 1;
const METH_HEAD = 2;
const METH_POST = 3;
const METH_PUT = 4;
const METH_DELETE = 5;
const METH_OPTIONS = 6;
const METH_TRACE = 7;
const METH_CONNECT = 8;
const METH_PROPFIND = 9;
const METH_PROPPATCH = 10;
const METH_MKCOL = 11;
const METH_COPY = 12;
const METH_MOVE = 13;
const METH_LOCK = 14;
const METH_UNLOCK = 15;
const METH_VERSION_CONTROL = 16;
const METH_REPORT = 17;
const METH_CHECKOUT = 18;
const METH_CHECKIN = 19;
const METH_UNCHECKOUT = 20;
const METH_MKWORKSPACE = 21;
const METH_UPDATE = 22;
const METH_LABEL = 23;
const METH_MERGE = 24;
const METH_BASELINE_CONTROL = 25;
const METH_MKACTIVITY = 26;
const METH_ACL = 27;
const VERSION_1_0 = 1;
const VERSION_1_1 = 2;
const VERSION_NONE = 0;
const VERSION_ANY = 0;
const SSL_VERSION_TLSv1 = 1;
const SSL_VERSION_SSLv2 = 2;
const SSL_VERSION_SSLv3 = 3;
const SSL_VERSION_ANY = 0;
const IPRESOLVE_V4 = 1;
const IPRESOLVE_V6 = 2;
const IPRESOLVE_ANY = 0;
const AUTH_BASIC = 1;
const AUTH_DIGEST = 2;
const AUTH_NTLM = 8;
const AUTH_GSSNEG = 4;
const AUTH_ANY = -1;
const PROXY_SOCKS4 = 4;
const PROXY_SOCKS5 = 5;
const PROXY_HTTP = 0;
private $options;
private $postFields;
private $postFiles;
private $responseInfo;
private $responseMessage;
private $responseCode;
private $responseStatus;
private $method;
private $url;
private $contentType;
private $requestBody;
private $queryData;
private $putFile;
private $putData;
private $history;
public $recordHistory;
/**
* (PECL pecl_http >= 0.10.0)<br/>
* HttpRequest constructor
* @link http://php.net/manual/en/function.httprequest-construct.php
* @param string $url [optional] <p>
* the target request url
* </p>
* @param int $request_method [optional] <p>
* the request method to use
* </p>
* @param array $options [optional] <p>
* an associative array with request options
* </p>
* @return void
*/
public function __construct ($url = null, $request_method = null, array $options = null ) {}
/**
* (PECL pecl_http >= 0.10.0)<br/>
* Set options
* @link http://php.net/manual/en/function.httprequest-setoptions.php
* @param array $options [optional] <p>
* an associative array, which values will overwrite the
* currently set request options;
* if empty or omitted, the options of the HttpRequest object will be reset
* </p>
* @return bool true on success or false on failure.
*/
public function setOptions (array $options = null ) {}
/**
* (PECL pecl_http >= 0.10.0)<br/>
* Get options
* @link http://php.net/manual/en/function.httprequest-getoptions.php
* @return array an associative array containing currently set options.
*/
public function getOptions () {}
/**
* (PECL pecl_http >= 0.10.0)<br/>
* Set ssl options
* @link http://php.net/manual/en/function.httprequest-setssloptions.php
* @param array $options [optional] <p>
* an associative array containing any SSL specific options;
* if empty or omitted, the SSL options will be reset
* </p>
* @return bool true on success or false on failure.
*/
public function setSslOptions (array $options = null ) {}
/**
* (PECL pecl_http >= 0.10.0)<br/>
* Get ssl options
* @link http://php.net/manual/en/function.httprequest-getssloptions.php
* @return array an associative array containing any previously set SSL options.
*/
public function getSslOptions () {}
/**
* (PECL pecl_http >= 0.12.0)<br/>
* Add ssl options
* @link http://php.net/manual/en/function.httprequest-addssloptions.php
* @param array $options <p>
* an associative array as parameter containing additional SSL specific options
* </p>
* @return bool true on success or false on failure.
*/
public function addSslOptions ($optionsarray ) {}
/**
* (PECL pecl_http >= 0.10.0)<br/>
* Add headers
* @link http://php.net/manual/en/function.httprequest-addheaders.php
* @param array $headers <p>
* an associative array as parameter containing additional header name/value pairs
* </p>
* @return bool true on success or false on failure.
*/
public function addHeaders ($headersarray ) {}
/**
* (PECL pecl_http >= 0.10.0)<br/>
* Get headers
* @link http://php.net/manual/en/function.httprequest-getheaders.php
* @return array an associative array containing all currently set headers.
*/
public function getHeaders () {}
/**
* (PECL pecl_http >= 0.12.0)<br/>
* Set headers
* @link http://php.net/manual/en/function.httprequest-setheaders.php
* @param array $headers [optional] <p>
* an associative array as parameter containing header name/value pairs;
* if empty or omitted, all previously set headers will be unset
* </p>
* @return bool true on success or false on failure.
*/
public function setHeaders ( array $headers = null ) {}
/**
* (PECL pecl_http >= 0.10.0)<br/>
* Add cookies
* @link http://php.net/manual/en/function.httprequest-addcookies.php
* @param array $cookies <p>
* an associative array containing any cookie name/value pairs to add
* </p>
* @return bool true on success or false on failure.
*/
public function addCookies ($cookiesarray ) {}
/**
* (PECL pecl_http >= 0.10.0)<br/>
* Get cookies
* @link http://php.net/manual/en/function.httprequest-getcookies.php
* @return array an associative array containing any previously set cookies.
*/
public function getCookies () {}
/**
* (PECL pecl_http >= 0.12.0)<br/>
* Set cookies
* @link http://php.net/manual/en/function.httprequest-setcookies.php
* @param array $cookies [optional] <p>
* an associative array as parameter containing cookie name/value pairs;
* if empty or omitted, all previously set cookies will be unset
* </p>
* @return bool true on success or false on failure.
*/
public function setCookies ( array $cookies = null ) {}
/**
* (PECL pecl_http >= 1.0.0)<br/>
* Enable cookies
* @link http://php.net/manual/en/function.httprequest-enablecookies.php
* @return bool true on success or false on failure.
*/
public function enableCookies () {}
/**
* (PECL pecl_http >= 1.0.0)<br/>
* Reset cookies
* @link http://php.net/manual/en/function.httprequest-resetcookies.php
* @param bool $session_only [optional] <p>
* whether only session cookies should be reset (needs libcurl >= v7.15.4, else libcurl >= v7.14.1)
* </p>
* @return bool true on success or false on failure.
*/
public function resetCookies ($session_only = null) {}
public function flushCookies () {}
/**
* (PECL pecl_http >= 0.10.0)<br/>
* Set method
* @link http://php.net/manual/en/function.httprequest-setmethod.php
* @param int $request_method <p>
* the request method to use
* </p>
* @return bool true on success or false on failure.
*/
public function setMethod ($request_method) {}
/**
* (PECL pecl_http >= 0.10.0)<br/>
* Get method
* @link http://php.net/manual/en/function.httprequest-getmethod.php
* @return int the currently set request method.
*/
public function getMethod () {}
/**
* (PECL pecl_http >= 0.10.0)<br/>
* Set URL
* @link http://php.net/manual/en/function.httprequest-seturl.php
* @param string $url <p>
* the request url
* </p>
* @return bool true on success or false on failure.
*/
public function setUrl ($url) {}
/**
* (PECL pecl_http >= 0.10.0)<br/>
* Get url