add deps
[pharext/pharext.org] / deps / pecl_http.api.php
1 <?php
2
3 namespace http
4 {
5
6 class Client implements \SplSubject, \Countable
7 {
8 private $observers;
9 protected $options;
10 protected $history;
11 public $recordHistory;
12
13 public function __construct($driver = NULL, $persistent_handle_id = NULL) {
14 }
15
16 public function reset() {
17 }
18
19 public function enqueue(\http\Client\Request $request, $callable = NULL) {
20 }
21
22 public function dequeue(\http\Client\Request $request) {
23 }
24
25 public function requeue(\http\Client\Request $request, $callable = NULL) {
26 }
27
28 public function count() {
29 }
30
31 public function send() {
32 }
33
34 public function once() {
35 }
36
37 public function wait($timeout = NULL) {
38 }
39
40 public function getResponse(\http\Client\Request $request = NULL) {
41 }
42
43 public function getHistory() {
44 }
45
46 public function configure(array $settings) {
47 }
48
49 public function enablePipelining($enable = NULL) {
50 }
51
52 public function enableEvents($enable = NULL) {
53 }
54
55 public function notify(\http\Client\Request $request = NULL) {
56 }
57
58 public function attach(\SplObserver $observer) {
59 }
60
61 public function detach(\SplObserver $observer) {
62 }
63
64 public function getObservers() {
65 }
66
67 public function getProgressInfo(\http\Client\Request $request) {
68 }
69
70 public function getTransferInfo(\http\Client\Request $request) {
71 }
72
73 public function setOptions(array $options = NULL) {
74 }
75
76 public function getOptions() {
77 }
78
79 public function setSslOptions(array $ssl_option = NULL) {
80 }
81
82 public function addSslOptions(array $ssl_options = NULL) {
83 }
84
85 public function getSslOptions() {
86 }
87
88 public function setCookies(array $cookies = NULL) {
89 }
90
91 public function addCookies(array $cookies = NULL) {
92 }
93
94 public function getCookies() {
95 }
96
97 public static function getAvailableDrivers() {
98 }
99
100 public function getAvailableOptions() {
101 }
102
103 public function getAvailableConfiguration() {
104 }
105
106 }
107
108 interface Exception
109 {
110 }
111
112 class Cookie
113 {
114 const PARSE_RAW = 1;
115 const SECURE = 16;
116 const HTTPONLY = 32;
117
118 public function __construct($cookie_string = NULL, $parser_flags = NULL, $allowed_extras = NULL) {
119 }
120
121 public function getCookies() {
122 }
123
124 public function setCookies($cookies = NULL) {
125 }
126
127 public function addCookies($cookies) {
128 }
129
130 public function getCookie($name) {
131 }
132
133 public function setCookie($cookie_name, $cookie_value = NULL) {
134 }
135
136 public function addCookie($cookie_name, $cookie_value) {
137 }
138
139 public function getExtras() {
140 }
141
142 public function setExtras($extras = NULL) {
143 }
144
145 public function addExtras($extras) {
146 }
147
148 public function getExtra($name) {
149 }
150
151 public function setExtra($extra_name, $extra_value = NULL) {
152 }
153
154 public function addExtra($extra_name, $extra_value) {
155 }
156
157 public function getDomain() {
158 }
159
160 public function setDomain($value = NULL) {
161 }
162
163 public function getPath() {
164 }
165
166 public function setPath($value = NULL) {
167 }
168
169 public function getExpires() {
170 }
171
172 public function setExpires($value = NULL) {
173 }
174
175 public function getMaxAge() {
176 }
177
178 public function setMaxAge($value = NULL) {
179 }
180
181 public function getFlags() {
182 }
183
184 public function setFlags($value = NULL) {
185 }
186
187 public function toArray() {
188 }
189
190 public function toString() {
191 }
192
193 public function __toString() {
194 }
195
196 }
197
198 class Env
199 {
200 public static function getRequestHeader($header_name = NULL) {
201 }
202
203 public static function getRequestBody($body_class_name = NULL) {
204 }
205
206 public static function getResponseStatusForCode($code) {
207 }
208
209 public static function getResponseStatusForAllCodes() {
210 }
211
212 public static function getResponseHeader($header_name = NULL) {
213 }
214
215 public static function getResponseCode() {
216 }
217
218 public static function setResponseHeader($header_name, $header_value = NULL, $response_code = NULL, $replace_header = NULL) {
219 }
220
221 public static function setResponseCode($code) {
222 }
223
224 public static function negotiateLanguage($supported, &$result_array = NULL) {
225 }
226
227 public static function negotiateContentType($supported, &$result_array = NULL) {
228 }
229
230 public static function negotiateEncoding($supported, &$result_array = NULL) {
231 }
232
233 public static function negotiateCharset($supported, &$result_array = NULL) {
234 }
235
236 public static function negotiate($params, $supported, $primary_type_separator = NULL, &$result_array = NULL) {
237 }
238
239 }
240
241 class Header implements \Serializable
242 {
243 const MATCH_LOOSE = 0;
244 const MATCH_CASE = 1;
245 const MATCH_WORD = 16;
246 const MATCH_FULL = 32;
247 const MATCH_STRICT = 33;
248
249 public $name;
250 public $value;
251
252 public function __construct($name = NULL, $value = NULL) {
253 }
254
255 public function serialize() {
256 }
257
258 public function __toString() {
259 }
260
261 public function toString() {
262 }
263
264 public function unserialize($serialized) {
265 }
266
267 public function match($value, $flags = NULL) {
268 }
269
270 public function negotiate($supported, &$result = NULL) {
271 }
272
273 public function getParams($param_sep = NULL, $arg_sep = NULL, $val_sep = NULL, $flags = NULL) {
274 }
275
276 public static function parse($string, $header_class = NULL) {
277 }
278
279 }
280
281 class Message implements \Countable, \Serializable, \Iterator
282 {
283 const TYPE_NONE = 0;
284 const TYPE_REQUEST = 1;
285 const TYPE_RESPONSE = 2;
286
287 protected $type;
288 protected $body;
289 protected $requestMethod;
290 protected $requestUrl;
291 protected $responseStatus;
292 protected $responseCode;
293 protected $httpVersion;
294 protected $headers;
295 protected $parentMessage;
296
297 public function __construct($message = NULL, $greedy = NULL) {
298 }
299
300 public function getBody() {
301 }
302
303 public function setBody(\http\Message\Body $body) {
304 }
305
306 public function addBody(\http\Message\Body $body) {
307 }
308
309 public function getHeader($header, $into_class = NULL) {
310 }
311
312 public function setHeader($header, $value = NULL) {
313 }
314
315 public function addHeader($header, $value) {
316 }
317
318 public function getHeaders() {
319 }
320
321 public function setHeaders(array $headers) {
322 }
323
324 public function addHeaders(array $headers, $append = NULL) {
325 }
326
327 public function getType() {
328 }
329
330 public function setType($type) {
331 }
332
333 public function getInfo() {
334 }
335
336 public function setInfo($http_info) {
337 }
338
339 public function getResponseCode() {
340 }
341
342 public function setResponseCode($response_code, $strict = NULL) {
343 }
344
345 public function getResponseStatus() {
346 }
347
348 public function setResponseStatus($response_status) {
349 }
350
351 public function getRequestMethod() {
352 }
353
354 public function setRequestMethod($request_method) {
355 }
356
357 public function getRequestUrl() {
358 }
359
360 public function setRequestUrl($url) {
361 }
362
363 public function getHttpVersion() {
364 }
365
366 public function setHttpVersion($http_version) {
367 }
368
369 public function getParentMessage() {
370 }
371
372 public function toString($include_parent = NULL) {
373 }
374
375 public function toCallback($callback) {
376 }
377
378 public function toStream($stream) {
379 }
380
381 public function count() {
382 }
383
384 public function serialize() {
385 }
386
387 public function unserialize($serialized) {
388 }
389
390 public function rewind() {
391 }
392
393 public function valid() {
394 }
395
396 public function current() {
397 }
398
399 public function key() {
400 }
401
402 public function next() {
403 }
404
405 public function __toString() {
406 }
407
408 public function detach() {
409 }
410
411 public function prepend(\http\Message $message, $top = NULL) {
412 }
413
414 public function reverse() {
415 }
416
417 public function isMultipart(&$boundary = NULL) {
418 }
419
420 public function splitMultipartBody() {
421 }
422
423 }
424
425 class Params implements \ArrayAccess
426 {
427 const DEF_PARAM_SEP = ',';
428 const DEF_ARG_SEP = ';';
429 const DEF_VAL_SEP = '=';
430 const COOKIE_PARAM_SEP = '';
431 const PARSE_RAW = 0;
432 const PARSE_ESCAPED = 1;
433 const PARSE_URLENCODED = 4;
434 const PARSE_DIMENSION = 8;
435 const PARSE_RFC5987 = 16;
436 const PARSE_RFC5988 = 32;
437 const PARSE_DEFAULT = 17;
438 const PARSE_QUERY = 12;
439
440 public $params;
441 public $param_sep;
442 public $arg_sep;
443 public $val_sep;
444 public $flags;
445
446 final public function __construct($params = NULL, $param_sep = NULL, $arg_sep = NULL, $val_sep = NULL, $flags = NULL) {
447 }
448
449 public function toArray() {
450 }
451
452 public function toString() {
453 }
454
455 public function __toString() {
456 }
457
458 public function offsetExists($name) {
459 }
460
461 public function offsetUnset($name) {
462 }
463
464 public function offsetSet($name, $value) {
465 }
466
467 public function offsetGet($name) {
468 }
469
470 }
471
472 class QueryString implements \Serializable, \ArrayAccess, \IteratorAggregate
473 {
474 const TYPE_BOOL = 3;
475 const TYPE_INT = 1;
476 const TYPE_FLOAT = 2;
477 const TYPE_STRING = 6;
478 const TYPE_ARRAY = 4;
479 const TYPE_OBJECT = 5;
480
481 private static $instance;
482 private $queryArray;
483
484 final public function __construct($params = NULL) {
485 }
486
487 public function toArray() {
488 }
489
490 public function toString() {
491 }
492
493 public function __toString() {
494 }
495
496 public function get($name = NULL, $type = NULL, $defval = NULL, $delete = NULL) {
497 }
498
499 public function set($params) {
500 }
501
502 public function mod($params = NULL) {
503 }
504
505 public function getBool($name, $defval = NULL, $delete = NULL) {
506 }
507
508 public function getInt($name, $defval = NULL, $delete = NULL) {
509 }
510
511 public function getFloat($name, $defval = NULL, $delete = NULL) {
512 }
513
514 public function getString($name, $defval = NULL, $delete = NULL) {
515 }
516
517 public function getArray($name, $defval = NULL, $delete = NULL) {
518 }
519
520 public function getObject($name, $defval = NULL, $delete = NULL) {
521 }
522
523 public function getIterator() {
524 }
525
526 public static function getGlobalInstance() {
527 }
528
529 public function xlate($from_encoding, $to_encoding) {
530 }
531
532 public function serialize() {
533 }
534
535 public function unserialize($serialized) {
536 }
537
538 public function offsetGet($offset) {
539 }
540
541 public function offsetSet($offset, $value) {
542 }
543
544 public function offsetExists($offset) {
545 }
546
547 public function offsetUnset($offset) {
548 }
549
550 }
551
552 class Url
553 {
554 const REPLACE = 0;
555 const JOIN_PATH = 1;
556 const JOIN_QUERY = 2;
557 const STRIP_USER = 4;
558 const STRIP_PASS = 8;
559 const STRIP_AUTH = 12;
560 const STRIP_PORT = 32;
561 const STRIP_PATH = 64;
562 const STRIP_QUERY = 128;
563 const STRIP_FRAGMENT = 256;
564 const STRIP_ALL = 492;
565 const FROM_ENV = 4096;
566 const SANITIZE_PATH = 8192;
567 const PARSE_MBLOC = 65536;
568 const PARSE_MBUTF8 = 131072;
569 const PARSE_TOIDN = 1048576;
570 const PARSE_TOPCT = 2097152;
571
572 public $scheme;
573 public $user;
574 public $pass;
575 public $host;
576 public $port;
577 public $path;
578 public $query;
579 public $fragment;
580
581 public function __construct($old_url = NULL, $new_url = NULL, $flags = NULL) {
582 }
583
584 public function mod($more_url_parts, $flags = NULL) {
585 }
586
587 public function toString() {
588 }
589
590 public function __toString() {
591 }
592
593 public function toArray() {
594 }
595
596 }
597 }
598
599 namespace http\Client
600 {
601
602 class Request extends \http\Message implements \Iterator, \Serializable, \Countable
603 {
604 protected $options;
605
606 public function __construct($method = NULL, $url = NULL, array $headers = NULL, \http\Message\Body $body = NULL) {
607 }
608
609 public function setContentType($content_type) {
610 }
611
612 public function getContentType() {
613 }
614
615 public function setQuery($query_data = NULL) {
616 }
617
618 public function getQuery() {
619 }
620
621 public function addQuery($query_data) {
622 }
623
624 public function setOptions(array $options = NULL) {
625 }
626
627 public function getOptions() {
628 }
629
630 public function setSslOptions(array $ssl_options = NULL) {
631 }
632
633 public function getSslOptions() {
634 }
635
636 public function addSslOptions(array $ssl_options = NULL) {
637 }
638
639 }
640
641 class Response extends \http\Message implements \Iterator, \Serializable, \Countable
642 {
643 protected $transferInfo;
644
645 public function getCookies($flags = NULL, $allowed_extras = NULL) {
646 }
647
648 public function getTransferInfo($element = NULL) {
649 }
650
651 }
652 }
653
654 namespace http\Client\Curl
655 {
656 const AUTH_ANY = -17;
657 const AUTH_BASIC = 1;
658 const AUTH_DIGEST = 2;
659 const AUTH_DIGEST_IE = 16;
660 const AUTH_GSSNEG = 4;
661 const AUTH_NTLM = 8;
662 const HTTP_VERSION_1_0 = 1;
663 const HTTP_VERSION_1_1 = 2;
664 const HTTP_VERSION_2_0 = 3;
665 const HTTP_VERSION_ANY = 0;
666 const IPRESOLVE_ANY = 0;
667 const IPRESOLVE_V4 = 1;
668 const IPRESOLVE_V6 = 2;
669 const POSTREDIR_301 = 1;
670 const POSTREDIR_302 = 2;
671 const POSTREDIR_303 = 4;
672 const POSTREDIR_ALL = 7;
673 const PROXY_HTTP = 0;
674 const PROXY_HTTP_1_0 = 1;
675 const PROXY_SOCKS4 = 4;
676 const PROXY_SOCKS4A = 5;
677 const PROXY_SOCKS5 = 5;
678 const PROXY_SOCKS5_HOSTNAME = 5;
679 const SSL_VERSION_ANY = 0;
680 const SSL_VERSION_SSLv2 = 2;
681 const SSL_VERSION_SSLv3 = 3;
682 const SSL_VERSION_TLSv1 = 1;
683 const SSL_VERSION_TLSv1_0 = 4;
684 const SSL_VERSION_TLSv1_1 = 5;
685 const SSL_VERSION_TLSv1_2 = 6;
686 }
687
688 namespace http\Encoding
689 {
690
691 abstract class Stream
692 {
693 const FLUSH_NONE = 0;
694 const FLUSH_SYNC = 1048576;
695 const FLUSH_FULL = 2097152;
696
697 public function __construct($flags = NULL) {
698 }
699
700 public function update($data) {
701 }
702
703 public function flush() {
704 }
705
706 public function done() {
707 }
708
709 public function finish() {
710 }
711
712 }
713 }
714
715 namespace http\Encoding\Stream
716 {
717
718 class Dechunk extends \http\Encoding\Stream
719 {
720 public static function decode($data, &$decoded_len = NULL) {
721 }
722
723 }
724
725 class Deflate extends \http\Encoding\Stream
726 {
727 const TYPE_GZIP = 16;
728 const TYPE_ZLIB = 0;
729 const TYPE_RAW = 32;
730 const LEVEL_DEF = 0;
731 const LEVEL_MIN = 1;
732 const LEVEL_MAX = 9;
733 const STRATEGY_DEF = 0;
734 const STRATEGY_FILT = 256;
735 const STRATEGY_HUFF = 512;
736 const STRATEGY_RLE = 768;
737 const STRATEGY_FIXED = 1024;
738
739 public static function encode($data, $flags = NULL) {
740 }
741
742 }
743
744 class Inflate extends \http\Encoding\Stream
745 {
746 public static function decode($data) {
747 }
748
749 }
750 }
751
752 namespace http\Env
753 {
754
755 class Request extends \http\Message implements \Iterator, \Serializable, \Countable
756 {
757 protected $query;
758 protected $form;
759 protected $cookie;
760 protected $files;
761
762 public function __construct() {
763 }
764
765 public function getForm($name = NULL, $type = NULL, $defval = NULL, $delete = NULL) {
766 }
767
768 public function getQuery($name = NULL, $type = NULL, $defval = NULL, $delete = NULL) {
769 }
770
771 public function getCookie($name = NULL, $type = NULL, $defval = NULL, $delete = NULL) {
772 }
773
774 public function getFiles() {
775 }
776
777 }
778
779 class Response extends \http\Message implements \Iterator, \Serializable, \Countable
780 {
781 const CONTENT_ENCODING_NONE = 0;
782 const CONTENT_ENCODING_GZIP = 1;
783 const CACHE_NO = 0;
784 const CACHE_HIT = 1;
785 const CACHE_MISS = 2;
786
787 protected $request;
788 protected $cookies;
789 protected $contentType;
790 protected $contentDisposition;
791 protected $contentEncoding;
792 protected $cacheControl;
793 protected $etag;
794 protected $lastModified;
795 protected $throttleDelay;
796 protected $throttleChunk;
797
798 public function __construct() {
799 }
800
801 public function __invoke($ob_string, $ob_flags = NULL) {
802 }
803
804 public function setEnvRequest(\http\Message $env_request) {
805 }
806
807 public function setCookie($cookie) {
808 }
809
810 public function setContentType($content_type) {
811 }
812
813 public function setContentDisposition(array $disposition_params) {
814 }
815
816 public function setContentEncoding($content_encoding) {
817 }
818
819 public function setCacheControl($cache_control) {
820 }
821
822 public function setLastModified($last_modified) {
823 }
824
825 public function isCachedByLastModified($header_name = NULL) {
826 }
827
828 public function setEtag($etag) {
829 }
830
831 public function isCachedByEtag($header_name = NULL) {
832 }
833
834 public function setThrottleRate($chunk_size, $delay = NULL) {
835 }
836
837 public function send($stream = NULL) {
838 }
839
840 }
841 }
842
843 namespace http\Exception
844 {
845
846 class BadConversionException extends \DomainException implements \http\Exception
847 {
848 }
849
850 class UnexpectedValueException extends \UnexpectedValueException implements \http\Exception
851 {
852 }
853
854 class BadUrlException extends \DomainException implements \http\Exception
855 {
856 }
857
858 class BadMethodCallException extends \BadMethodCallException implements \http\Exception
859 {
860 }
861
862 class RuntimeException extends \RuntimeException implements \http\Exception
863 {
864 }
865
866 class InvalidArgumentException extends \InvalidArgumentException implements \http\Exception
867 {
868 }
869
870 class BadMessageException extends \DomainException implements \http\Exception
871 {
872 }
873
874 class BadHeaderException extends \DomainException implements \http\Exception
875 {
876 }
877
878 class BadQueryStringException extends \DomainException implements \http\Exception
879 {
880 }
881 }
882
883 namespace http\Header
884 {
885
886 class Parser
887 {
888 const CLEANUP = 1;
889 const STATE_FAILURE = -1;
890 const STATE_START = 0;
891 const STATE_KEY = 1;
892 const STATE_VALUE = 2;
893 const STATE_VALUE_EX = 3;
894 const STATE_HEADER_DONE = 4;
895 const STATE_DONE = 5;
896
897 public function getState() {
898 }
899
900 public function parse($data, $flags, array &$headers) {
901 }
902
903 public function stream($stream, $flags, array &$headers) {
904 }
905
906 }
907 }
908
909 namespace http\Message
910 {
911
912 class Body implements \Serializable
913 {
914 public function __construct($stream = NULL) {
915 }
916
917 public function __toString() {
918 }
919
920 public function toString() {
921 }
922
923 public function serialize() {
924 }
925
926 public function unserialize($serialized) {
927 }
928
929 public function toStream($stream, $offset = NULL, $maxlen = NULL) {
930 }
931
932 public function toCallback($callback, $offset = NULL, $maxlen = NULL) {
933 }
934
935 public function getResource() {
936 }
937
938 public function getBoundary() {
939 }
940
941 public function append($string) {
942 }
943
944 public function addForm(array $fields = NULL, array $files = NULL) {
945 }
946
947 public function addPart(\http\Message $message) {
948 }
949
950 public function etag() {
951 }
952
953 public function stat($field = NULL) {
954 }
955
956 }
957
958 class Parser
959 {
960 const CLEANUP = 1;
961 const DUMB_BODIES = 2;
962 const EMPTY_REDIRECTS = 4;
963 const GREEDY = 8;
964 const STATE_FAILURE = -1;
965 const STATE_START = 0;
966 const STATE_HEADER = 1;
967 const STATE_HEADER_DONE = 2;
968 const STATE_BODY = 3;
969 const STATE_BODY_DUMB = 4;
970 const STATE_BODY_LENGTH = 5;
971 const STATE_BODY_CHUNKED = 6;
972 const STATE_BODY_DONE = 7;
973 const STATE_UPDATE_CL = 8;
974 const STATE_DONE = 9;
975
976 public function getState() {
977 }
978
979 public function parse($data, $flags, &$message) {
980 }
981
982 public function stream($stream, $flags, &$message) {
983 }
984
985 }
986 }
987