From 20ec5ed652443fcdefc3961ed99bbc95973521bd Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Thu, 31 Oct 2013 11:17:36 +0100 Subject: [PATCH] flush --- http.md | 10 +++++++--- http/Env.md | 2 +- http/Header.md | 2 +- http/Object.md | 19 +++++++++++++++++++ http/Object/getDefaultErrorHandling.md | 8 ++++++++ http/Object/getErrorHandling.md | 12 ++++++++++++ http/Object/setDefaultErrorHandling.md | 17 +++++++++++++++++ http/Object/setErrorHandling.md | 21 +++++++++++++++++++++ http/Object/triggerError.md | 13 +++++++++++++ http/Params.md | 2 +- 10 files changed, 100 insertions(+), 6 deletions(-) create mode 100644 http/Object.md create mode 100644 http/Object/getDefaultErrorHandling.md create mode 100644 http/Object/getErrorHandling.md create mode 100644 http/Object/setDefaultErrorHandling.md create mode 100644 http/Object/setErrorHandling.md create mode 100644 http/Object/triggerError.md diff --git a/http.md b/http.md index 6175e26..e06a5bc 100644 --- a/http.md +++ b/http.md @@ -1,5 +1,9 @@ -# namespace http - -This is pecl_http-v2. +# pecl/http v2 This documentation is work-in-progress. + +## INI Directives: + +* http.etag.mode = "crc32b" + Default hash method for dynamic response payloads to generate an ETag. + diff --git a/http/Env.md b/http/Env.md index d4245bb..e33774a 100644 --- a/http/Env.md +++ b/http/Env.md @@ -4,7 +4,7 @@ The http\Env class provides static methods to manipulate and inspect the server' ## Request startup -The http\Env module overrides PHP's builtin POST data parser to be run also if +The http\Env module extends PHP's builtin POST data parser to be run also if the request method is not POST. Additionally it will handle application/json payloads if ext/json is available. Successfully parsed JSON will be put right into the $_POST array. diff --git a/http/Header.md b/http/Header.md index 037d7a4..6261bae 100644 --- a/http/Header.md +++ b/http/Header.md @@ -9,7 +9,7 @@ The http\Header class provides methods to manipulate, match, negotiate and seria * MATCH_CASE Perform case sensitive matching. * MATCH_WORD - Match only on word boundaries (according by CTYPE alpha-numeric). + Match only on word boundaries (according by CType alpha-numeric). * MATCH_FULL Match the complete string. * MATCH_STRICT diff --git a/http/Object.md b/http/Object.md new file mode 100644 index 0000000..a04b873 --- /dev/null +++ b/http/Object.md @@ -0,0 +1,19 @@ +# abstract class http\Object + +The http\Object class provides an error handling foundation for the rest of the http extension's framwework. + +## Constants: + +* EH_NORMAL + Normal error handling. +* EH_SUPPRESS + Suppress errors. +* EH_THROW + Throw exceptions on errors. + +## Properties: + +* static protected $defaultErrorHandling = NULL + Static default error handling. +* protected $errorHandling = NULL + Per instance error handling. diff --git a/http/Object/getDefaultErrorHandling.md b/http/Object/getDefaultErrorHandling.md new file mode 100644 index 0000000..936d36e --- /dev/null +++ b/http/Object/getDefaultErrorHandling.md @@ -0,0 +1,8 @@ +# static int http\Object::getDefaultErrorHandling() + +Retreive the http extension's global default error handling. + +## Returns: + +* int, the error handling. See http\Object::EH_* constants. +* NULL, when error handling is not set. diff --git a/http/Object/getErrorHandling.md b/http/Object/getErrorHandling.md new file mode 100644 index 0000000..c44dcfa --- /dev/null +++ b/http/Object/getErrorHandling.md @@ -0,0 +1,12 @@ +# int http\Object::getErrorHandling() + +Retrieve the currently set instance error handling. + +## Params: + +None. + +## Returns: + +* int, the current error handling. See http\Object::EH_* constants. + diff --git a/http/Object/setDefaultErrorHandling.md b/http/Object/setDefaultErrorHandling.md new file mode 100644 index 0000000..950af94 --- /dev/null +++ b/http/Object/setDefaultErrorHandling.md @@ -0,0 +1,17 @@ +# static void http\Object::setDefaultErrorHandling(int $eh) + +Set the http extension's global default error handling. + +## Params: + +* int $eh + The error handling. See http\Object::EH_* constants. + +## Throws: + +* http\Exception + When http\Object::EH_THROW is in effect. + +## Warnings: + +* E_RUNTIME, if $eh is an unknown error handling. diff --git a/http/Object/setErrorHandling.md b/http/Object/setErrorHandling.md new file mode 100644 index 0000000..09763ef --- /dev/null +++ b/http/Object/setErrorHandling.md @@ -0,0 +1,21 @@ +# http\Object http\Object::setErrorHandling(int $eh) + +Set instance error handling. + +## Params: + +* int $eh + The error handling this instance should enforce. + +## Returns: + +* http/Object, self. + +## Throws: + +* http\Exception + When http\Object::EH_THROW is in effect. + +## Warnings: + +* E_RUNTIME, if $eh is an unknown error handling code. diff --git a/http/Object/triggerError.md b/http/Object/triggerError.md new file mode 100644 index 0000000..72ba2f2 --- /dev/null +++ b/http/Object/triggerError.md @@ -0,0 +1,13 @@ +# void http\Object::triggerError(int $eh, int $code, string $error) + +Trigger an error with the specified error handling. + +## Params: + +* int $eh + The error handling to use. See http\Object::EH_* constants. +* int $code + The error code. +* string $error + The error message. + diff --git a/http/Params.md b/http/Params.md index 3d80b88..b45d0c6 100644 --- a/http/Params.md +++ b/http/Params.md @@ -21,7 +21,7 @@ Parse, interpret and compose HTTP (header) parameters. * PARSE_DIMENSION Parse sub dimensions indicated by square brackets. * PARSE_QUERY - Parse URL query string (same as http\Params::PARSE_URLENCODED|http\Params::PARSE_DIMENSION). + Parse URL querystring (same as http\Params::PARSE_URLENCODED|http\Params::PARSE_DIMENSION). ## Properties: -- 2.30.2