Add all the phpdocs to the domframework
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1246 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
13
http.php
13
http.php
@@ -1,4 +1,10 @@
|
||||
<?php
|
||||
/** DomFramework
|
||||
@package domframework
|
||||
@author Dominique Fournier <dominique@fournier38.fr> */
|
||||
|
||||
/** HTTP Helper : understand the best choices provided by browser, the HTTP
|
||||
codes */
|
||||
class http
|
||||
{
|
||||
/** Choose the best choice from user choices.
|
||||
@@ -9,7 +15,9 @@ class http
|
||||
If available is empty, then return the best priority defined by user,
|
||||
and throw an exception if nothing is provided for by the user.
|
||||
If nothing match, return $default
|
||||
*/
|
||||
@param string $uservar The parameter provided by the user
|
||||
@param array|null $available The list of available choices in the soft
|
||||
@param string|null $default The choice if nothing match */
|
||||
function bestChoice ($uservar, $available=array(), $default=FALSE)
|
||||
{
|
||||
$uservar = str_replace (" ", "", $uservar);
|
||||
@@ -53,7 +61,8 @@ class http
|
||||
return $default;
|
||||
}
|
||||
|
||||
/** Return the associated text for a HTTP code */
|
||||
/** Return the associated text for a HTTP code
|
||||
@param integer $code The HTTP code to translate in text */
|
||||
function codetext ($code)
|
||||
{
|
||||
switch ($code)
|
||||
|
||||
Reference in New Issue
Block a user