Last active
August 29, 2015 14:12
-
-
Save paranoiq/3efb943f8cba1aa7d9e0 to your computer and use it in GitHub Desktop.
Generated stub file for PHP extension `http` v2.1.4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// extension: http | |
// version: 2.1.4 | |
namespace { | |
define('http\Client\Curl\HTTP_VERSION_1_0', 1); | |
define('http\Client\Curl\HTTP_VERSION_1_1', 2); | |
define('http\Client\Curl\HTTP_VERSION_ANY', 0); | |
define('http\Client\Curl\SSL_VERSION_TLSv1', 1); | |
define('http\Client\Curl\SSL_VERSION_TLSv1_0', 4); | |
define('http\Client\Curl\SSL_VERSION_TLSv1_1', 5); | |
define('http\Client\Curl\SSL_VERSION_TLSv1_2', 6); | |
define('http\Client\Curl\SSL_VERSION_SSLv2', 2); | |
define('http\Client\Curl\SSL_VERSION_SSLv3', 3); | |
define('http\Client\Curl\SSL_VERSION_ANY', 0); | |
define('http\Client\Curl\IPRESOLVE_V4', 1); | |
define('http\Client\Curl\IPRESOLVE_V6', 2); | |
define('http\Client\Curl\IPRESOLVE_ANY', 0); | |
define('http\Client\Curl\AUTH_BASIC', 1); | |
define('http\Client\Curl\AUTH_DIGEST', 2); | |
define('http\Client\Curl\AUTH_DIGEST_IE', 16); | |
define('http\Client\Curl\AUTH_NTLM', 8); | |
define('http\Client\Curl\AUTH_GSSNEG', 4); | |
define('http\Client\Curl\AUTH_ANY', -17); | |
define('http\Client\Curl\PROXY_SOCKS4', 4); | |
define('http\Client\Curl\PROXY_SOCKS4A', 5); | |
define('http\Client\Curl\PROXY_SOCKS5_HOSTNAME', 5); | |
define('http\Client\Curl\PROXY_SOCKS5', 5); | |
define('http\Client\Curl\PROXY_HTTP', 0); | |
define('http\Client\Curl\PROXY_HTTP_1_0', 1); | |
define('http\Client\Curl\POSTREDIR_301', 1); | |
define('http\Client\Curl\POSTREDIR_302', 2); | |
define('http\Client\Curl\POSTREDIR_303', 4); | |
define('http\Client\Curl\POSTREDIR_ALL', 7); | |
} | |
namespace http | |
{ | |
class Client implements \SplSubject, \Countable | |
{ | |
private $observers; | |
protected $options; | |
protected $history; | |
public $recordHistory = FALSE; | |
/** | |
* Create a new HTTP client. | |
* @param string $driver | |
* @param string $persistent_handle_id | |
* @return void | |
*/ | |
function __construct($driver = NULL, $persistent_handle_id = NULL) | |
{ | |
} | |
/** | |
* Reset the client to the initial state. | |
* @return \http\Client | |
*/ | |
function reset() | |
{ | |
} | |
/** | |
* Add another http\Client\Request to the request queue. | |
* @param \http\Client\Request $request | |
* @param callable $cb | |
* @return \http\Client | |
*/ | |
function enqueue(Client\Request $request, $callable) | |
{ | |
} | |
/** | |
* Dequeue the http\Client\Request $request. | |
* @param \http\Client\Request $request | |
* @return \http\Client | |
*/ | |
function dequeue(Client\Request $request) | |
{ | |
} | |
/** | |
* Requeue an http\Client\Request. | |
* @param \http\Client\Request $request | |
* @return \http\Client | |
*/ | |
function requeue(Client\Request $request, $callable) | |
{ | |
} | |
/** | |
* Implements Countable. Retrieve the number of enqueued requests. | |
* @return int | |
*/ | |
function count() | |
{ | |
} | |
/** | |
* Send all enqueued requests. | |
* @return \http\Client | |
*/ | |
function send() | |
{ | |
} | |
/** | |
* Perform outstanding transfer actions. | |
* @return bool | |
*/ | |
function once() | |
{ | |
} | |
/** | |
* Wait for $timeout seconds for transfers to provide data. | |
* @param float $timeout | |
* @return bool | |
*/ | |
function wait($timeout) | |
{ | |
} | |
/** | |
* Retrieve the corresponding reponse of an already finished request, or the last received response if $request is not set. | |
* @param \http\Client\Request $request | |
* @return \http\Client\Response | |
*/ | |
function getResponse(Client\Request $request = NULL) | |
{ | |
} | |
/** | |
* Simply returns the http\Message chain representing the request/response history. | |
* @return \http\Message | |
*/ | |
function getHistory() | |
{ | |
} | |
/** | |
* Enable sending pipelined requests to the same host if the driver supports it. | |
* @param bool $enable | |
* @return \http\Client | |
*/ | |
function enablePipelining($enable = true) | |
{ | |
} | |
/** | |
* Enable usage of an event library like libevent, which might improve performance with big socket sets. | |
* @param bool $enable | |
* @return \http\Client | |
*/ | |
function enableEvents($enable = true) | |
{ | |
} | |
/** | |
* Implements SplSubject. Notify attached observers about progress with $request. | |
* @param \http\Client\Request $request | |
* @param object $progress | |
* @return \http\Client | |
*/ | |
function notify(Client\Request $request = NULL) | |
{ | |
} | |
/** | |
* Implements SplSubject. Attach another observer. | |
* @param \SplObserver $observer | |
* @return \http\Client | |
*/ | |
function attach(\SplObserver $observer) | |
{ | |
} | |
/** | |
* Implements SplSubject. Detach $observer, which has been previously attached. | |
* @param \SplObserver $observer | |
* @return \http\Client | |
*/ | |
function detach(\SplObserver $observer) | |
{ | |
} | |
/** | |
* Returns the SplObjectStorage holding attached observers. | |
* @return \SplObjectStorage | |
*/ | |
function getObservers() | |
{ | |
} | |
/** | |
* Retrieve the progress information for $request. | |
* @param \http\Client\Request $request | |
* @return object | |
*/ | |
function getProgressInfo(Client\Request $request) | |
{ | |
} | |
/** | |
* Get transfer related informatioin for a running or finished request. | |
* @param \http\Client\Request $request | |
* @return object | |
*/ | |
function getTransferInfo(Client\Request $request) | |
{ | |
} | |
/** | |
* Set client options. | |
* @param array $options | |
* @return \http\Client | |
*/ | |
function setOptions(array $options = NULL) | |
{ | |
} | |
/** | |
* Get priorly set options. | |
* @return array | |
*/ | |
function getOptions() | |
{ | |
} | |
/** | |
* Specifically set SSL options. | |
* @param array $ssl_options | |
* @return \http\Client | |
*/ | |
function setSslOptions(array $ssl_option = NULL) | |
{ | |
} | |
/** | |
* Add specific SSL options. | |
* @param array $ssl_options | |
* @return \http\Client | |
*/ | |
function addSslOptions(array $ssl_options = NULL) | |
{ | |
} | |
/** | |
* Retrieve priorly set SSL options. | |
* @return array | |
*/ | |
function getSslOptions() | |
{ | |
} | |
/** | |
* Set custom cookies. | |
* @param array $cookies | |
* @return \http\Client | |
*/ | |
function setCookies(array $cookies = NULL) | |
{ | |
} | |
/** | |
* Add custom cookies. | |
* @param array $cookies | |
* @return \http\Client | |
*/ | |
function addCookies(array $cookies = NULL) | |
{ | |
} | |
/** | |
* Get priorly set custom cookies. | |
* @return array | |
*/ | |
function getCookies() | |
{ | |
} | |
/** | |
* List available drivers. | |
* @return array | |
*/ | |
static function getAvailableDrivers() | |
{ | |
} | |
} | |
class Cookie | |
{ | |
/** | |
* Create a new cookie list. | |
* @param mixed $cookies | |
* @param int $flags | |
* @param array $allowed_extras | |
* @return void | |
*/ | |
function __construct($cookie_string = NULL, $parser_flags, $allowed_extras = NULL) | |
{ | |
} | |
/** | |
* Get the list of cookies. | |
* @return array | |
*/ | |
function getCookies() | |
{ | |
} | |
/** | |
* (Re)set the cookies. | |
* @param array $cookies | |
* @return \http\Cookie | |
*/ | |
function setCookies($cookies = NULL) | |
{ | |
} | |
/** | |
* (Re)set the cookies. | |
* @param array $cookies | |
* @return \http\Cookie | |
*/ | |
function addCookies($cookies) | |
{ | |
} | |
/** | |
* Retrieve a specific cookie value. | |
* @param string $cookie_name | |
* @return string | |
*/ | |
function getCookie($name) | |
{ | |
} | |
/** | |
* (Re)set a cookie. | |
* @param string $cookie_name | |
* @param string $cookie_value | |
* @return \http\Cookie | |
*/ | |
function setCookie($cookie_name, $cookie_value) | |
{ | |
} | |
/** | |
* Add a cookie. | |
* @param string $cookie_name | |
* @param string $cookie_value | |
* @return \http\Cookie | |
*/ | |
function addCookie($cookie_name, $cookie_value) | |
{ | |
} | |
/** | |
* Retrieve the list of extra attributes. | |
* @return array | |
*/ | |
function getExtras() | |
{ | |
} | |
/** | |
* (Re)set the extra attributes. | |
* @param array $extras | |
* @return \http\Cookie | |
*/ | |
function setExtras($extras = NULL) | |
{ | |
} | |
/** | |
* Add several extra attributes. | |
* @param array $extras | |
* @return \http\Cookie | |
*/ | |
function addExtras($extras) | |
{ | |
} | |
/** | |
* Retrieve an extra attribute. | |
* @param string $name | |
* @return string | |
*/ | |
function getExtra($name) | |
{ | |
} | |
/** | |
* (Re)set an extra attribute. | |
* @param string $extra_name | |
* @param string $extra_value | |
* @return \http\Cookie | |
*/ | |
function setExtra($extra_name, $extra_value = NULL) | |
{ | |
} | |
/** | |
* Add an extra attribute to the cookie list. | |
* @param string $extra_name | |
* @param string $extra_value | |
* @return \http\Cookie | |
*/ | |
function addExtra($extra_name, $extra_value) | |
{ | |
} | |
/** | |
* Retrieve the effective domain of the cookie list. | |
* @return string | |
*/ | |
function getDomain() | |
{ | |
} | |
/** | |
* Set the effective domain of the cookie list. | |
* @param string $value | |
* @return \http\Cookie | |
*/ | |
function setDomain($value = NULL) | |
{ | |
} | |
/** | |
* Retrieve the path the cookie(s) of this cookie list are effective at. | |
* @return string | |
*/ | |
function getPath() | |
{ | |
} | |
/** | |
* Set the path the cookie(s) of this cookie list should be effective at. | |
* @param string $path | |
* @return \http\Cookie | |
*/ | |
function setPath($value = NULL) | |
{ | |
} | |
/** | |
* Get the currently set expires attribute. | |
* @return int | |
*/ | |
function getExpires() | |
{ | |
} | |
/** | |
* Set the traditional expires timestamp. | |
* @param int $value | |
* @return \http\Cookie | |
*/ | |
function setExpires($value = -1) | |
{ | |
} | |
/** | |
* Get the currently set max-age attribute of the cookie list. | |
* @return int | |
*/ | |
function getMaxAge() | |
{ | |
} | |
/** | |
* Set the maximum age the cookie may have on the client side. | |
* @param int $value | |
* @return \http\Cookie | |
*/ | |
function setMaxAge($value = -1) | |
{ | |
} | |
/** | |
* Get the currently set flags. | |
* @return int | |
*/ | |
function getFlags() | |
{ | |
} | |
/** | |
* Set the flags to specified $value. | |
* @param int $value | |
* @return \http\Cookie | |
*/ | |
function setFlags($value) | |
{ | |
} | |
/** | |
* Get the cookie list as array. | |
* @return array | |
*/ | |
function toArray() | |
{ | |
} | |
/** | |
* Retrieve the string representation of the cookie list. | |
* @return string | |
*/ | |
function toString() | |
{ | |
} | |
/** | |
* String cast handler. Alias of http\Cookie::toString(). | |
* @return string | |
*/ | |
function __toString() | |
{ | |
} | |
} | |
class Env | |
{ | |
/** | |
* Retrieve one or all headers of the current HTTP request. | |
* @param string $header_name | |
* @return mixed | |
*/ | |
static function getRequestHeader($header_name) | |
{ | |
} | |
/** | |
* Retreive the current HTTP request’s body. | |
* @param string $body_class_name | |
* @return \http\Message\Body | |
*/ | |
static function getRequestBody($body_class_name) | |
{ | |
} | |
/** | |
* Retrieve the string representation of specified HTTP response code. | |
* @param int $code | |
* @return string | |
*/ | |
static function getResponseStatusForCode($code) | |
{ | |
} | |
/** | |
* Retrieve a list of all known HTTP response status. | |
* @return array | |
*/ | |
static function getResponseStatusForAllCodes() | |
{ | |
} | |
/** | |
* Get one or all HTTP response headers to be sent. | |
* @param string $header_name | |
* @return mixed | |
*/ | |
static function getResponseHeader($header_name) | |
{ | |
} | |
/** | |
* Get the HTTP response code to send. | |
* @return int | |
*/ | |
static function getResponseCode() | |
{ | |
} | |
/** | |
* Set a response header, either replacing a prior set header, or appending the new header value, depending on $replace. | |
* @param string $header_name | |
* @param mixed $header_value | |
* @param int $response_code | |
* @param bool $replace | |
* @return bool | |
*/ | |
static function setResponseHeader($header_name, $header_value = NULL, $response_code, $replace_header = true) | |
{ | |
} | |
/** | |
* Set the HTTP response code to send. | |
* @param int $code | |
* @return bool | |
*/ | |
static function setResponseCode($code) | |
{ | |
} | |
/** | |
* Negotiate the client’s preferred language. | |
* @param array $supported | |
* @return string | |
*/ | |
static function negotiateLanguage($supported, &$result_array) | |
{ | |
} | |
/** | |
* Negotiate the client’s preferred MIME content type. | |
* @param array $supported | |
* @return string | |
*/ | |
static function negotiateContentType($supported, &$result_array) | |
{ | |
} | |
/** | |
* Negotiate the client’s preferred encoding. | |
* @param array $supported | |
* @return string | |
*/ | |
static function negotiateEncoding($supported, &$result_array) | |
{ | |
} | |
/** | |
* Negotiate the client’s preferred character set. | |
* @param array $supported | |
* @return string | |
*/ | |
static function negotiateCharset($supported, &$result_array) | |
{ | |
} | |
/** | |
* Generic negotiator. For specific client negotiation see http\Env::negotiateContentType() and related methods. | |
* @param string $params | |
* @param array $supported | |
* @param string $prim_typ_sep | |
* @return string | |
*/ | |
static function negotiate($params, $supported, $primary_type_separator, &$result_array) | |
{ | |
} | |
} | |
interface Exception | |
{ | |
} | |
class Header implements \Serializable | |
{ | |
public $name; | |
public $value; | |
/** | |
* Create an http\Header instance for use of simple matching or negotiation. If the value of the header is an array it may be compounded to a single comma separated string. | |
* @param string $name | |
* @param mixed $value | |
* @return void | |
*/ | |
function __construct($name, $value) | |
{ | |
} | |
/** | |
* Implements Serializable. | |
* @return string | |
*/ | |
function serialize() | |
{ | |
} | |
/** | |
* String cast handler. Alias of http\Header::serialize(). | |
* @return string | |
*/ | |
function __toString() | |
{ | |
} | |
/** | |
* Convenience method. Alias of http\Header::serialize(). | |
* @return string | |
*/ | |
function toString() | |
{ | |
} | |
/** | |
* Implements Serializable. | |
* @param string $serialized | |
* @return void | |
*/ | |
function unserialize($serialized) | |
{ | |
} | |
/** | |
* Match the HTTP header’s value against provided $value according to $flags. | |
* @param string $value | |
* @param int $flags | |
* @return bool | |
*/ | |
function match($value, $flags = \http\Header::MATCH_LOOSE) | |
{ | |
} | |
/** | |
* Negotiate the header’s value against a list of supported values in $supported. | |
* @param array $supported | |
* @return string | |
*/ | |
function negotiate($supported, &$result) | |
{ | |
} | |
/** | |
* Create a parameter list out of the HTTP header value. | |
* @param mixed $ps | |
* @param mixed $as | |
* @param mixed $vs | |
* @param int $flags | |
* @return \http\Params | |
*/ | |
function getParams($param_sep = ",", $arg_sep = ";", $val_sep = "=", $flags = \http\Params::PARSE_DEFAULT) | |
{ | |
} | |
/** | |
* Parse HTTP headers. | |
* @param string $header | |
* @param string $header_class | |
* @return array | |
*/ | |
static function parse($string, $header_class = NULL) | |
{ | |
} | |
} | |
class Message implements \Countable, \Serializable, \Iterator, \Traversable | |
{ | |
protected $type = 0; | |
protected $body; | |
protected $requestMethod = ''; | |
protected $requestUrl = ''; | |
protected $responseStatus = ''; | |
protected $responseCode = 0; | |
protected $httpVersion; | |
protected $headers; | |
protected $parentMessage; | |
/** | |
* Create a new HTTP message. | |
* @param mixed $message | |
* @param bool $greedy | |
* @return void | |
*/ | |
function __construct($message = NULL, $greedy = true) | |
{ | |
} | |
/** | |
* Retrieve the message’s body. | |
* @return \http\Message\Body | |
*/ | |
function getBody() | |
{ | |
} | |
/** | |
* Set the message’s body. | |
* @param \http\Message\Body $body | |
* @return \http\Message | |
*/ | |
function setBody(Message\Body $body) | |
{ | |
} | |
/** | |
* Append the data of $body to the message’s body. | |
* @param \http\Message\Body $body | |
* @return \http\Message | |
*/ | |
function addBody(Message\Body $body) | |
{ | |
} | |
/** | |
* Retrieve a single header, optionally hydrated into a http\Header extending class. | |
* @param string $header | |
* @param string $into_class | |
* @return mixed | |
*/ | |
function getHeader($header, $into_class = NULL) | |
{ | |
} | |
/** | |
* Set a single header. | |
* @param string $header | |
* @param mixed $value | |
* @return \http\Message | |
*/ | |
function setHeader($header, $value = NULL) | |
{ | |
} | |
/** | |
* Add an header, appending to already existing headers. | |
* @param string $name | |
* @param mixed $value | |
* @return \http\Message | |
*/ | |
function addHeader($header, $value) | |
{ | |
} | |
/** | |
* Retrieve all message headers. | |
* @return array | |
*/ | |
function getHeaders() | |
{ | |
} | |
/** | |
* Set the message headers. | |
* @param array $headers | |
* @return \http\Message | |
*/ | |
function setHeaders(array $headers = NULL) | |
{ | |
} | |
/** | |
* Add headers, optionally appending values, if header keys already exist. | |
* @param array $headers | |
* @param bool $append | |
* @return \http\Message | |
*/ | |
function addHeaders(array $headers, $append = false) | |
{ | |
} | |
/** | |
* Retrieve the type of the message. | |
* @return int | |
*/ | |
function getType() | |
{ | |
} | |
/** | |
* Set the message type and reset the message info. | |
* @param int $type | |
* @return \http\Message | |
*/ | |
function setType($type) | |
{ | |
} | |
/** | |
* Retrieve the first line of a request or response message. | |
* @return string | |
*/ | |
function getInfo() | |
{ | |
} | |
/** | |
* Set the complete message info, i.e. type and response resp. request information, at once. | |
* @param string $http_info | |
* @return \http\Message | |
*/ | |
function setInfo($http_info) | |
{ | |
} | |
/** | |
* Retrieve the response code of the message. | |
* @return int | |
*/ | |
function getResponseCode() | |
{ | |
} | |
/** | |
* Set the response status code. | |
* @param int $response_code | |
* @param bool $strict | |
* @return \http\Message | |
*/ | |
function setResponseCode($response_code, $strict = true) | |
{ | |
} | |
/** | |
* Retrieve the response status of the message. | |
* @return string | |
*/ | |
function getResponseStatus() | |
{ | |
} | |
/** | |
* Set the response status phrase. | |
* @param string $response_status | |
* @return \http\Message | |
*/ | |
function setResponseStatus($response_status) | |
{ | |
} | |
/** | |
* Retrieve the request method of the message. | |
* @return string | |
*/ | |
function getRequestMethod() | |
{ | |
} | |
/** | |
* Set the request method of the message. | |
* @param string $method | |
* @return \http\Message | |
*/ | |
function setRequestMethod($request_method) | |
{ | |
} | |
/** | |
* Retrieve the request URL of the message. | |
* @return string | |
*/ | |
function getRequestUrl() | |
{ | |
} | |
/** | |
* Set the request URL of the message. | |
* @param string $url | |
* @return \http\Message | |
*/ | |
function setRequestUrl($url) | |
{ | |
} | |
/** | |
* Retreive the HTTP protocol version of the message. | |
* @return string | |
*/ | |
function getHttpVersion() | |
{ | |
} | |
/** | |
* Set the HTTP protocol version of the message. | |
* @param string $http_version | |
* @return \http\Message | |
*/ | |
function setHttpVersion($http_version) | |
{ | |
} | |
/** | |
* Retrieve any parent message. | |
* @return \http\Message | |
*/ | |
function getParentMessage() | |
{ | |
} | |
/** | |
* Retrieve the message serialized to a string. | |
* @param bool $include_parent | |
* @return string | |
*/ | |
function toString($include_parent = false) | |
{ | |
} | |
/** | |
* Stream the message through a callback. | |
* @param callable $callback | |
* @param int $offset | |
* @param int $maxlen | |
* @return \http\Message | |
*/ | |
function toCallback($callback) | |
{ | |
} | |
/** | |
* Stream the message into stream $stream, starting from $offset, streaming $maxlen at most. | |
* @param resource $stream | |
* @param int $offset | |
* @param int $maxlen | |
* @return \http\Message | |
*/ | |
function toStream($stream) | |
{ | |
} | |
/** | |
* Implements Countable. | |
* @return int | |
*/ | |
function count() | |
{ | |
} | |
/** | |
* Implements Serializable. | |
* @return string | |
*/ | |
function serialize() | |
{ | |
} | |
function unserialize($serialized) | |
{ | |
} | |
/** | |
* Implements Iterator. | |
* @return void | |
*/ | |
function rewind() | |
{ | |
} | |
/** | |
* Implements Iterator. | |
* @return bool | |
*/ | |
function valid() | |
{ | |
} | |
/** | |
* Implements iterator. | |
* @return \http\Message | |
*/ | |
function current() | |
{ | |
} | |
/** | |
* Implements Iterator. | |
* @return int | |
*/ | |
function key() | |
{ | |
} | |
/** | |
* Implements Iterator. | |
* @return void | |
*/ | |
function next() | |
{ | |
} | |
/** | |
* Retrieve the message serialized to a string. | |
* @return string | |
*/ | |
function __toString() | |
{ | |
} | |
/** | |
* Detach a clone of this message from any message chain. | |
* @return \http\Message | |
*/ | |
function detach() | |
{ | |
} | |
/** | |
* Prepend message(s) $message to this message, or the top most message of this message chain. | |
* @param \http\Message $message | |
* @param bool $top | |
* @return \http\Message | |
*/ | |
function prepend(Message $message, $top = true) | |
{ | |
} | |
/** | |
* Reverse the message chain and return the former top-most message. | |
* @return \http\Message | |
*/ | |
function reverse() | |
{ | |
} | |
/** | |
* Check whether this message is a multipart message based on it’s content type. | |
* @return bool | |
*/ | |
function isMultipart(&$boundary) | |
{ | |
} | |
/** | |
* Splits the body of a multipart message. | |
* @return \http\Message | |
*/ | |
function splitMultipartBody() | |
{ | |
} | |
} | |
class Params implements \ArrayAccess | |
{ | |
public $params; | |
public $param_sep = ','; | |
public $arg_sep = ';'; | |
public $val_sep = '='; | |
public $flags = 17; | |
/** | |
* Instantiate a new HTTP (header) parameter set. | |
* @param mixed $params | |
* @param mixed $ps | |
* @param mixed $as | |
* @param mixed $vs | |
* @param int $flags | |
* @return void | |
*/ | |
final function __construct($params = NULL, $param_sep = \http\Params::DEF_PARAM_SEP, $arg_sep = \http\Params::DEF_ARG_SEP, $val_sep = \http\Params::DEF_VAL_SEP, $flags = \http\Params::PARSE_DEFAULT) | |
{ | |
} | |
/** | |
* Convenience method that simply returns http\Params::$params. | |
* @return array | |
*/ | |
function toArray() | |
{ | |
} | |
/** | |
* Returns a stringified version of the parameters. | |
* @return string | |
*/ | |
function toString() | |
{ | |
} | |
/** | |
* String cast handler. Alias of http\Params::toString(). | |
* @return string | |
*/ | |
function __toString() | |
{ | |
} | |
/** | |
* Implements ArrayAccess. | |
* @param string $name | |
* @return bool | |
*/ | |
function offsetExists($name) | |
{ | |
} | |
/** | |
* Implements ArrayAccess. | |
* @param string $name | |
* @return void | |
*/ | |
function offsetUnset($name) | |
{ | |
} | |
/** | |
* Implements ArrayAccess. | |
* @param string $name | |
* @param mixed $value | |
* @return void | |
*/ | |
function offsetSet($name, $value) | |
{ | |
} | |
/** | |
* Implements ArrayAccess. | |
* @param string $name | |
* @return mixed | |
*/ | |
function offsetGet($name) | |
{ | |
} | |
} | |
class QueryString implements \Serializable, \ArrayAccess, \IteratorAggregate, \Traversable | |
{ | |
private static $instance; | |
private $queryArray; | |
/** | |
* Create an independent querystring instance. | |
* @param mixed $params | |
* @return void | |
*/ | |
final function __construct($params = NULL) | |
{ | |
} | |
/** | |
* Simply returns http\QueryString::$queryArray. | |
* @return array | |
*/ | |
function toArray() | |
{ | |
} | |
/** | |
* Get the string represenation of the querystring (x-www-form-urlencoded). | |
* @return string | |
*/ | |
function toString() | |
{ | |
} | |
function __toString() | |
{ | |
} | |
/** | |
* Retrieve an querystring value. | |
* @param string $name | |
* @param mixed $type | |
* @param mixed $defval | |
* @param bool $delete | |
* @return mixed | |
*/ | |
function get($name = NULL, $type = NULL, $defval = NULL, $delete = false) | |
{ | |
} | |
/** | |
* Set additional querystring entries. | |
* @param mixed $params | |
* @return \http\QueryString | |
*/ | |
function set($params) | |
{ | |
} | |
/** | |
* Set additional $params to a clone of this instance. | |
* @param mixed $params | |
* @return \http\QueryString | |
*/ | |
function mod($params = NULL) | |
{ | |
} | |
/** | |
* Retrieve a boolean value at offset $name. | |
* @param string $name | |
* @param mixed $defval | |
* @param bool $delete | |
* @return bool | |
*/ | |
function getBool($name, $defval = NULL, $delete = false) | |
{ | |
} | |
/** | |
* Retrieve a int value at offset $name. | |
* @param string $name | |
* @param mixed $defval | |
* @param bool $delete | |
* @return int | |
*/ | |
function getInt($name, $defval = NULL, $delete = false) | |
{ | |
} | |
/** | |
* Retrieve a float value at offset $name. | |
* @param string $name | |
* @param mixed $defval | |
* @param bool $delete | |
* @return float | |
*/ | |
function getFloat($name, $defval = NULL, $delete = false) | |
{ | |
} | |
/** | |
* Retrieve a string value with at offset $name. | |
* @param string $name | |
* @param mixed $defval | |
* @param bool $delete | |
* @return string | |
*/ | |
function getString($name, $defval = NULL, $delete = false) | |
{ | |
} | |
/** | |
* Retrieve an array value with at offset $name. | |
* @param string $name | |
* @param mixed $defval | |
* @param bool $delete | |
* @return array | |
*/ | |
function getArray($name, $defval = NULL, $delete = false) | |
{ | |
} | |
/** | |
* Retrieve a object value with at offset $name. | |
* @param string $name | |
* @param mixed $defval | |
* @param bool $delete | |
* @return object | |
*/ | |
function getObject($name, $defval = NULL, $delete = false) | |
{ | |
} | |
/** | |
* Implements IteratorAggregate. | |
* @return \Iterator | |
*/ | |
function getIterator() | |
{ | |
} | |
/** | |
* Retrieve the global querystring instance referencing $_GET. | |
* @return \http\QueryString | |
*/ | |
static function getGlobalInstance() | |
{ | |
} | |
/** | |
* Translate character encodings of the querystring with ext/iconv. | |
* @return \http\QueryString | |
*/ | |
function xlate($from_encoding, $to_encoding) | |
{ | |
} | |
/** | |
* Implements Serializable. | |
* @return string | |
*/ | |
function serialize() | |
{ | |
} | |
function unserialize($serialized) | |
{ | |
} | |
/** | |
* Implements ArrayAccess. | |
* @param string $name | |
* @return mixed | |
*/ | |
function offsetGet($offset) | |
{ | |
} | |
/** | |
* Implements ArrayAccess. | |
* @param string $name | |
* @param mixed $data | |
* @return void | |
*/ | |
function offsetSet($offset, $value) | |
{ | |
} | |
/** | |
* Implements ArrayAccess. | |
* @param string $name | |
* @return bool | |
*/ | |
function offsetExists($offset) | |
{ | |
} | |
/** | |
* Implements ArrayAccess. | |
* @param string $name | |
* @return void | |
*/ | |
function offsetUnset($offset) | |
{ | |
} | |
} | |
class Url | |
{ | |
public $scheme; | |
public $user; | |
public $pass; | |
public $host; | |
public $port; | |
public $path; | |
public $query; | |
public $fragment; | |
/** | |
* Create an instance of an http\Url. | |
* @param mixed $old_url | |
* @param mixed $new_url | |
* @param int $flags | |
* @return void | |
*/ | |
function __construct($old_url = NULL, $new_url = NULL, $flags = \http\Url::FROM_ENV) | |
{ | |
} | |
/** | |
* Clone this URL and apply $parts to the cloned URL. | |
* @param mixed $parts | |
* @param int $flags | |
* @return \http\Url | |
*/ | |
function mod($more_url_parts, $flags = 'http\\Url::JOIN_PATH|http\\Url::JOIN_QUERY') | |
{ | |
} | |
/** | |
* Get the string prepresentation of the URL. | |
* @return string | |
*/ | |
function toString() | |
{ | |
} | |
/** | |
* String cast handler. Alias of http\Url::toString(). | |
* @return string | |
*/ | |
function __toString() | |
{ | |
} | |
/** | |
* Retrieve the URL parts as array. | |
* @return array | |
*/ | |
function toArray() | |
{ | |
} | |
} | |
} | |
namespace http\Client | |
{ | |
class Request extends \http\Message | |
{ | |
protected $options; | |
/** | |
* Create a new client request message to be enqueued and sent by http\Client. | |
* @param string $meth | |
* @param string $url | |
* @param array $headers | |
* @param \http\Message\Body $body | |
* @return void | |
*/ | |
function __construct($method = NULL, $url = NULL, array $headers = NULL, \http\Message\Body $body = NULL) | |
{ | |
} | |
/** | |
* Set the MIME content type of the request message. | |
* @param string $content_type | |
* @return \http\Client\Request | |
*/ | |
function setContentType($content_type) | |
{ | |
} | |
/** | |
* Extract the currently set “Content-Type” header. | |
* @return string | |
*/ | |
function getContentType() | |
{ | |
} | |
/** | |
* (Re)set the querystring. | |
* @param mixed $query_data | |
* @return \http\Client\Request | |
*/ | |
function setQuery($query_data = NULL) | |
{ | |
} | |
/** | |
* Retrieve the currently set querystring. | |
* @return string | |
*/ | |
function getQuery() | |
{ | |
} | |
/** | |
* Add querystring data. | |
* @param mixed $query_data | |
* @return \http\Client\Request | |
*/ | |
function addQuery($query_data) | |
{ | |
} | |
/** | |
* Set client options. | |
* @param array $options | |
* @return \http\Client\Request | |
*/ | |
function setOptions(array $options = NULL) | |
{ | |
} | |
/** | |
* Get priorly set options. | |
* @return array | |
*/ | |
function getOptions() | |
{ | |
} | |
/** | |
* Specifically set SSL options. | |
* @param array $ssl_options | |
* @return \http\Client\Request | |
*/ | |
function setSslOptions(array $ssl_options = NULL) | |
{ | |
} | |
/** | |
* Retrieve priorly set SSL options. | |
* @return array | |
*/ | |
function getSslOptions() | |
{ | |
} | |
/** | |
* Add specific SSL options. | |
* @param array $ssl_options | |
* @return \http\Client\Request | |
*/ | |
function addSslOptions(array $ssl_options = NULL) | |
{ | |
} | |
} | |
class Response extends \http\Message | |
{ | |
protected $transferInfo; | |
/** | |
* Extract response cookies. | |
* @param int $flags | |
* @param array $allowed_extras | |
* @return mixed | |
*/ | |
function getCookies($flags, $allowed_extras = NULL) | |
{ | |
} | |
/** | |
* Retrieve transfer related information after the request has completed. | |
* @param string $name | |
* @return mixed | |
*/ | |
function getTransferInfo($element = NULL) | |
{ | |
} | |
} | |
} | |
namespace http\Encoding | |
{ | |
abstract class Stream | |
{ | |
/** | |
* Base constructor for encoding stream implementations. | |
* @param int $flags | |
* @return void | |
*/ | |
function __construct($flags) | |
{ | |
} | |
/** | |
* Update the encoding stream with more input. | |
* @param string $data | |
* @return string | |
*/ | |
function update($data) | |
{ | |
} | |
/** | |
* Flush the encoding stream. | |
* @return string | |
*/ | |
function flush() | |
{ | |
} | |
/** | |
* Check whether the encoding stream is already done. | |
* @return bool | |
*/ | |
function done() | |
{ | |
} | |
/** | |
* Finish and reset the encoding stream. | |
* @return string | |
*/ | |
function finish() | |
{ | |
} | |
} | |
} | |
namespace http\Encoding\Stream | |
{ | |
class Dechunk extends \http\Encoding\Stream | |
{ | |
/** | |
* Decode chunked encoded data. | |
* @param string $data | |
* @return string | |
*/ | |
static function decode($data, &$decoded_len) | |
{ | |
} | |
} | |
class Deflate extends \http\Encoding\Stream | |
{ | |
/** | |
* Encode data with deflate/zlib/gzip encoding. | |
* @param string $data | |
* @param int $flags | |
* @return string | |
*/ | |
static function encode($data, $flags) | |
{ | |
} | |
} | |
class Inflate extends \http\Encoding\Stream | |
{ | |
/** | |
* Decode deflate/zlib/gzip encoded data. | |
* @param string $data | |
* @return string | |
*/ | |
static function decode($data) | |
{ | |
} | |
} | |
} | |
namespace http\Env | |
{ | |
class Request extends \http\Message | |
{ | |
protected $query; | |
protected $form; | |
protected $files; | |
/** | |
* Create an instance of the server’s current HTTP request. | |
* @return void | |
*/ | |
function __construct() | |
{ | |
} | |
/** | |
* Retrieve a form value ($_POST). | |
* @param string $name | |
* @param mixed $type | |
* @param mixed $defval | |
* @param bool $delete | |
* @return mixed | |
*/ | |
function getForm($name = NULL, $type = NULL, $defval = NULL, $delete = false) | |
{ | |
} | |
/** | |
* Retrieve an URL query value ($_GET). | |
* @param string $name | |
* @param mixed $type | |
* @param mixed $defval | |
* @param bool $delete | |
* @return mixed | |
*/ | |
function getQuery($name = NULL, $type = NULL, $defval = NULL, $delete = false) | |
{ | |
} | |
/** | |
* Retrieve the uploaded files list ($_FILES). | |
* @return array | |
*/ | |
function getFiles() | |
{ | |
} | |
} | |
class Response extends \http\Message | |
{ | |
protected $request; | |
protected $contentType; | |
protected $contentDisposition; | |
protected $contentEncoding; | |
protected $cacheControl; | |
protected $etag; | |
protected $lastModified; | |
protected $throttleDelay; | |
protected $throttleChunk; | |
/** | |
* Create a new env response message instance. | |
* @return void | |
*/ | |
function __construct() | |
{ | |
} | |
/** | |
* Output buffer handler. | |
* @param string $data | |
* @param int $ob_flags | |
* @return bool | |
*/ | |
function __invoke($ob_string, $ob_flags) | |
{ | |
} | |
/** | |
* Override the environment’s request. | |
* @param \http\Message $env_request | |
* @return \http\Env\Response | |
*/ | |
function setEnvRequest(\http\Message $env_request) | |
{ | |
} | |
/** | |
* Set the MIME content type of the response. | |
* @param string $content_type | |
* @return \http\Env\Response | |
*/ | |
function setContentType($content_type) | |
{ | |
} | |
/** | |
* Set the reponse’s content disposition parameters. | |
* @param array $disposition_params | |
* @return \http\Env\Response | |
*/ | |
function setContentDisposition(array $disposition_params) | |
{ | |
} | |
/** | |
* Enable support for “Accept-Encoding” requests with deflate or gzip. | |
* @param int $content_encoding | |
* @return \http\Env\Response | |
*/ | |
function setContentEncoding($content_encoding) | |
{ | |
} | |
/** | |
* Make suggestions to the client how it should cache the response. | |
* @param string $cache_control | |
* @return \http\Env\Response | |
*/ | |
function setCacheControl($cache_control) | |
{ | |
} | |
/** | |
* Set a custom last modified time stamp. | |
* @param int $last_modified | |
* @return \http\Env\Response | |
*/ | |
function setLastModified($last_modified) | |
{ | |
} | |
/** | |
* Manually test the header $header_name of the environment’s request for a cache hit. | |
* @param string $header_name | |
* @return int | |
*/ | |
function isCachedByLastModified($header_name = "If-Modified-Since") | |
{ | |
} | |
/** | |
* Set a custom ETag. | |
* @param string $etag | |
* @return \http\Env\Response | |
*/ | |
function setEtag($etag) | |
{ | |
} | |
/** | |
* Manually test the header $header_name of the environment’s request for a cache hit. | |
* @param string $header_name | |
* @return int | |
*/ | |
function isCachedByEtag($header_name = "If-None-Match") | |
{ | |
} | |
/** | |
* Enable throttling. | |
* @param int $chunk_size | |
* @param float $delay | |
* @return \http\Env\Response | |
*/ | |
function setThrottleRate($chunk_size, $delay = 1) | |
{ | |
} | |
/** | |
* Send the response through the SAPI or $stream. | |
* @param resource $stream | |
* @return bool | |
*/ | |
function send($stream = NULL) | |
{ | |
} | |
} | |
} | |
namespace http\Exception | |
{ | |
class BadConversionException extends \DomainException implements \http\Exception | |
{ | |
} | |
class BadHeaderException extends \DomainException implements \http\Exception | |
{ | |
} | |
class BadMessageException extends \DomainException implements \http\Exception | |
{ | |
} | |
class BadMethodCallException extends \BadMethodCallException implements \http\Exception | |
{ | |
} | |
class BadQueryStringException extends \DomainException implements \http\Exception | |
{ | |
} | |
class BadUrlException extends \DomainException implements \http\Exception | |
{ | |
} | |
class InvalidArgumentException extends \InvalidArgumentException implements \http\Exception | |
{ | |
} | |
class RuntimeException extends \RuntimeException implements \http\Exception | |
{ | |
} | |
class UnexpectedValueException extends \UnexpectedValueException implements \http\Exception | |
{ | |
} | |
} | |
namespace http\Message | |
{ | |
class Body implements \Serializable | |
{ | |
/** | |
* Create a new message body, optionally referencing $stream. | |
* @param resource $stream | |
* @return void | |
*/ | |
function __construct($stream = NULL) | |
{ | |
} | |
/** | |
* String cast handler. | |
* @return string | |
*/ | |
function __toString() | |
{ | |
} | |
/** | |
* Retrieve the message body serialized to a string. | |
* @return string | |
*/ | |
function toString() | |
{ | |
} | |
/** | |
* Implements Serializable. | |
* @return string | |
*/ | |
function serialize() | |
{ | |
} | |
/** | |
* Implements Serializable. | |
* @param string $serialized | |
* @return void | |
*/ | |
function unserialize($serialized) | |
{ | |
} | |
/** | |
* Stream the message body into antother stream $stream, starting from $offset, streaming $maxlen at most. | |
* @param resource $stream | |
* @param int $offset | |
* @param int $maxlen | |
* @return \http\Message\Body | |
*/ | |
function toStream($stream, $offset, $maxlen) | |
{ | |
} | |
/** | |
* Stream the message body through a callback. | |
* @param callable $callback | |
* @param int $offset | |
* @param int $maxlen | |
* @return \http\Message\Body | |
*/ | |
function toCallback($callback, $offset, $maxlen) | |
{ | |
} | |
/** | |
* Retrieve the underlying stream resource. | |
* @return resource | |
*/ | |
function getResource() | |
{ | |
} | |
/** | |
* Retrieve any boundary of the message body. | |
* @return string | |
*/ | |
function getBoundary() | |
{ | |
} | |
/** | |
* Append plain bytes to the message body. | |
* @param string $data | |
* @return \http\Message\Body | |
*/ | |
function append($string) | |
{ | |
} | |
/** | |
* Add form fields and files to the message body. | |
* @param array $fields | |
* @param array $files | |
* @return \http\Message\Body | |
*/ | |
function addForm(array $fields = NULL, array $files = NULL) | |
{ | |
} | |
/** | |
* Add a part to a multipart body. | |
* @param \http\Message $part | |
* @return \http\Message\Body | |
*/ | |
function addPart(\http\Message $message) | |
{ | |
} | |
/** | |
* Retrieve the ETag of the body. | |
* @return string | |
*/ | |
function etag() | |
{ | |
} | |
/** | |
* Stat size, atime, mtime and/or ctime. | |
* @param string $field | |
* @return mixed | |
*/ | |
function stat($field = NULL) | |
{ | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tady je špatná výchozí hodnota pro flags: https://gist.github.com/paranoiq/3efb943f8cba1aa7d9e0#file-pecl_http-stub-php-L1783