flush
authorMichael Wallner <mike@php.net>
Thu, 31 Oct 2013 10:17:36 +0000 (11:17 +0100)
committerMichael Wallner <mike@php.net>
Thu, 31 Oct 2013 10:17:36 +0000 (11:17 +0100)
http.md
http/Env.md
http/Header.md
http/Object.md [new file with mode: 0644]
http/Object/getDefaultErrorHandling.md [new file with mode: 0644]
http/Object/getErrorHandling.md [new file with mode: 0644]
http/Object/setDefaultErrorHandling.md [new file with mode: 0644]
http/Object/setErrorHandling.md [new file with mode: 0644]
http/Object/triggerError.md [new file with mode: 0644]
http/Params.md

diff --git a/http.md b/http.md
index 6175e26c14ad76f980ed602ba08a95527161d260..e06a5bc6d952e0cc51200b853f60b3dc69e2ed74 100644 (file)
--- 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.
+
index d4245bb2a7c56a42dfbdaad05743d17849ed8a6b..e33774a845a2296ebf57602cc9b181d9074ea3ea 100644 (file)
@@ -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.
index 037d7a437e1cf3e876851c981a95c8a3d9aa7f44..6261bae2b0ab949e46ddbc98686993f5a9d2f087 100644 (file)
@@ -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 (file)
index 0000000..a04b873
--- /dev/null
@@ -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 (file)
index 0000000..936d36e
--- /dev/null
@@ -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 (file)
index 0000000..c44dcfa
--- /dev/null
@@ -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 (file)
index 0000000..950af94
--- /dev/null
@@ -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 (file)
index 0000000..09763ef
--- /dev/null
@@ -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 (file)
index 0000000..72ba2f2
--- /dev/null
@@ -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.
+
index 3d80b880039213c94ae671b807001888716df87c..b45d0c64840f8bb55c640fa0a191ab2519fa5246 100644 (file)
@@ -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: