From: Michael Wallner Date: Fri, 7 Nov 2014 19:39:23 +0000 (+0100) Subject: http\Url changes; adjust class' properties docs X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=e62e3fe51ec3cd99e8141a22cb0daafe7f7a4bbe;p=mdref%2Fmdref-http http\Url changes; adjust class' properties docs --- diff --git a/http/Client.md b/http/Client.md index 4e9cb4e..d86ad75 100644 --- a/http/Client.md +++ b/http/Client.md @@ -103,11 +103,11 @@ The HTTP client. See http\Client\Curl's [options](http/Client/Curl#Options:) whi ## Properties: -* private $observers = NULL - SplObjectStorage, attached observers. -* protected $options = NULL - Array of set options. -* protected $history = NULL - http\Message request/response history. -* public $recordHistory = false - Boolean flag whether to record history in http\Client::$history. +* private SplObjectStorage $observers = NULL + Attached observers. +* protected array $options = NULL + Set options. +* protected http\Message $history = NULL + Request/response history. +* public bool $recordHistory = false + Whether to record history in http\Client::$history. diff --git a/http/Client/Curl.md b/http/Client/Curl.md index d934004..82b86ab 100644 --- a/http/Client/Curl.md +++ b/http/Client/Curl.md @@ -125,18 +125,18 @@ The option names used here are more or less derived from the corresponding CURLO A list of HOST:PORT:ADDRESS mappings which pre-populate the DNS cache. Available if libcurl is v7.21.3 or more recent. * string $dns_servers Comma separated list of custom DNS servers of the form HOST[:PORT]. Available if libcurl is v7.24.0 or more recent and has built-in c-ares support. -* string $dns_interface +* string $dns_interface The name of the network interface ***name*** that the DNS resolver should bind to. Available if libcurl is v7.33.0 or more recent and has built-in c-ares support. -* string $dns_local_ip4 +* string $dns_local_ip4 The local IPv4 ***address*** that the resolver should bind to. Available if libcurl is v7.33.0 or more recent and has built-in c-ares support. -* string $dns_local_ip6 +* string $dns_local_ip6 The local IPv6 ***address*** that the resolver should bind to. Available if libcurl is v7.33.0 or more recent and has built-in c-ares support. ### Limits * int $low_speed_limit Minimum speed in bytes per second. -* int $low_speed_time +* int $low_speed_time Maximum time in seconds the transfer can be below $low_speed_limit before cancelling. * int $maxfilesize Maximum download size. diff --git a/http/Client/Request.md b/http/Client/Request.md index 16019ce..7baedae 100644 --- a/http/Client/Request.md +++ b/http/Client/Request.md @@ -10,6 +10,6 @@ None. ## Properties: -* protected $options = NULL +* protected array $options = NULL Array of options for this request, which override client options. diff --git a/http/Env/Request.md b/http/Env/Request.md index 57dc787..75161a6 100644 --- a/http/Env/Request.md +++ b/http/Env/Request.md @@ -10,9 +10,9 @@ None. ## Properties: -* protected $query = NULL +* protected http\QueryString $query = NULL The request's query parameters. ($_GET) -* protected $form = NULL +* protected http\QueryString $form = NULL The request's form parameters. ($_POST) -* protected $files = NULL +* protected array $files = NULL The request's form uploads. ($_FILES) diff --git a/http/Env/Response.md b/http/Env/Response.md index dcb4f24..8aaee1f 100644 --- a/http/Env/Response.md +++ b/http/Env/Response.md @@ -19,21 +19,21 @@ See http\Message for inherited members. ## Properties: -* protected $request = NULL - A http\Env\Request instance which overrides the environments default request. -* protected $contentType = NULL +* protected http\Env\Request $request = NULL + A request instance which overrides the environments default request. +* protected string $contentType = NULL The response's MIME content type. -* protected $contentDisposition = NULL +* protected string $contentDisposition = NULL The response's MIME content disposition. -* protected $contentEncoding = NULL +* protected int $contentEncoding = NULL See http\Env\Response::CONTENT_ENCODING_* constants. -* protected $cacheControl = NULL +* protected string $cacheControl = NULL How the client should treat this response in regards to caching. -* protected $etag = NULL +* protected string $etag = NULL A custom ETag. -* protected $lastModified = NULL +* protected int $lastModified = NULL A "Last-Modified" time stamp. -* protected $throttleDelay = NULL +* protected int $throttleDelay = NULL Any throttling delay. -* protected $throttleChunk = NULL +* protected int $throttleChunk = NULL The chunk to send every $throttleDelay seconds. diff --git a/http/Header.md b/http/Header.md index 59ad426..b391051 100644 --- a/http/Header.md +++ b/http/Header.md @@ -17,7 +17,7 @@ The http\Header class provides methods to manipulate, match, negotiate and seria ## Properties: -* public $name = NULL +* public string $name = NULL The name of the HTTP header. -* public $value = NULL +* public mixed $value = NULL The value of the HTTP header. diff --git a/http/Params.md b/http/Params.md index 51863f0..44d90d3 100644 --- a/http/Params.md +++ b/http/Params.md @@ -99,13 +99,13 @@ Yields: ## Properties: -* public $params = NULL +* public array $params = NULL The (parsed) parameters. -* public $param_sep = http\Params::DEF_PARAM_SEP +* public array $param_sep = http\Params::DEF_PARAM_SEP The parameter separator(s). -* public $arg_sep = http\Params::DEF_ARG_SEP +* public array $arg_sep = http\Params::DEF_ARG_SEP The argument separator(s). -* public $val_sep = http\Params::DEF_VAL_SEP +* public array $val_sep = http\Params::DEF_VAL_SEP The value separator(s). -* public $flags = http\Params::PARSE_DEFAULT +* public int $flags = http\Params::PARSE_DEFAULT The modus operandi of the parser. See http\Params::PARSE_* constants. diff --git a/http/QueryString.md b/http/QueryString.md index 9f4f0d1..a547b1c 100644 --- a/http/QueryString.md +++ b/http/QueryString.md @@ -20,9 +20,9 @@ The http\QueryString class provides versatile facilities to retrieve, use and ma ## Properties: -* private $instance = NULL +* private http\QueryString $instance = NULL The global instance. See http\QueryString::getGlobalInstance(). -* private $queryArray = NULL - The data array. +* private array $queryArray = NULL + The data. diff --git a/http/Url.md b/http/Url.md index b9ef47f..61ab10d 100644 --- a/http/Url.md +++ b/http/Url.md @@ -2,6 +2,20 @@ The http\Url class provides versatile means to parse, construct and manipulate URLs. +## Changelog + +Version | Changes +--------|-------- +2.2.0 | Added parser constants:
http\Url::PARSE_MBUTF8,
http\Url::PARSE_MBLOC (on systems with wide character support),
http\Url::PARSE_TOPCT,
http\Url::PARSE_TOIDN (with libidn support). + +## Backwards compatibility + +### New parser in v2.2.0 + +PHP's [parse_url()](http://php.net/parse_url) is avoided since v2.2.0. + +Creating an empty url by `new http\Url(NULL, NULL, 0)` will not result in `http://localhost/` anymore but in an empty URL instead. + ## Constants: * REPLACE @@ -30,23 +44,30 @@ The http\Url class provides versatile means to parse, construct and manipulate U Import initial URL parts from the SAPI environment. * SANITIZE_PATH Whether to sanitize the URL path (consolidate double slashes, directory jumps etc.) - +* PARSE_MBUTF8 + Parse UTF-8 encododed multibyte sequences. +* PARSE_MBLOC + Parse locale encoded multibyte sequences (on systems with wide character support). +* PARSE_TOIDN + Parse and convert multibyte hostnames according to IDNA (with libidn support). +* PARSE_TOPCT + Percent encode multibyte sequences in the userinfo, path, query and fragment parts of the URL. ## Properties: -* public $scheme = NULL +* public string $scheme = NULL The URL's scheme. -* public $user = NULL +* public string $user = NULL Authenticating user. -* public $pass = NULL +* public string $pass = NULL Authentication password. -* public $host = NULL +* public string $host = NULL Hostname/domain. -* public $port = NULL +* public string $port = NULL Port. -* public $path = NULL +* public string $path = NULL URL path. -* public $query = NULL +* public string $query = NULL URL querystring. -* public $fragment = NULL +* public string $fragment = NULL URL fragment (hash).