Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
Lib.Http.php File Reference

Go to the source code of this file.

Namespaces

 FDL
 

Functions

 Redirect ($action, $appname, $actionname, $otherurl="", $httpparamredirect=false)
 
 RedirectSender (Action &$action)
 
 redirectAsGuest (Action &$action)
 
 getHttpVars ($name, $def="", $scope="all")
 
 GetHttpCookie ($name, $def="")
 
 SetHttpVar ($name, $def)
 
 GetMimeType ($ext)
 
 GetExt ($mime_type)
 
 Http_Download ($src, $ext, $name, $add_ext=TRUE, $mime_type="")
 
 Http_DownloadFile ($filename, $name, $mime_type= '', $inline=false, $cache=true, $deleteafter=false)
 
 PrintAllHttpVars ()
 
 glue_url ($parsed)
 
 setHeaderCache ($mime="text/css")
 

Function Documentation

GetExt (   $mime_type)

Definition at line 169 of file Lib.Http.php.

GetHttpCookie (   $name,
  $def = "" 
)

Definition at line 142 of file Lib.Http.php.

getHttpVars (   $name,
  $def = "",
  $scope = "all" 
)

return value of an http parameter

Parameters
string$nameparameter key
string$defdefault value if parameter is not set
string$scopeThe scope for the search of the value ('zone' for $ZONE_ARGS, 'get' for $_GET, 'post' for $_POST and 'all' for searching in all)
Returns
string

Definition at line 124 of file Lib.Http.php.

GetMimeType (   $ext)

Definition at line 158 of file Lib.Http.php.

glue_url (   $parsed)

Definition at line 286 of file Lib.Http.php.

Http_Download (   $src,
  $ext,
  $name,
  $add_ext = TRUE,
  $mime_type = "" 
)

Send a response with the given data to be downloaded by the client.

No output should be generated on stdout after calling this function.

Parameters
string$srcthe data to send to the client
string$extthe extension of the data (e.g. "pdf", "png", etc.)
string$namethe filename that will be used by the client for saving to a file
bool$add_extadd the $ext extension to the $name filename (default = TRUE)
string$mime_typethe Content-Type MIME type of the response. If empty, compute MIME type from $ext extension (this is the default behaviour)
Returns
void

Definition at line 197 of file Lib.Http.php.

+ Here is the call graph for this function:

Http_DownloadFile (   $filename,
  $name,
  $mime_type = '',
  $inline = false,
  $cache = true,
  $deleteafter = false 
)

Send a response with the content of a local file to be downloaded by the client

No output should be generated on stdout after calling this function.

Parameters
string$filenamepathname of the file that will be sent to the client (e.g. "/tmp/foo.pdf")
string$namethe basename of the file (e.g. "foo.pdf")
string$mime_typethe Content-Type MIME type of the response (e.g. "application/pdf")
bool$inlineSend the data with inline Content-Disposition (default = FALSE)
bool$cacheInstruct clients and/or proxies to cache the response for 24h (default = TRUE)
bool$deleteafterDelete the $filename file when done (default = FALSE)
Returns
void

Definition at line 225 of file Lib.Http.php.

PrintAllHttpVars ( )

Definition at line 276 of file Lib.Http.php.

Redirect (   $action,
  $appname,
  $actionname,
  $otherurl = "",
  $httpparamredirect = false 
)
Parameters
Action | Application$action
string$appname
string$actionname
string$otherurl
bool$httpparamredirect

PhpUndefinedNamespaceInspection

PhpUndefinedClassInspection

Definition at line 21 of file Lib.Http.php.

redirectAsGuest ( Action $action)

if in useIndexAsGuest mode redirect with authtication to current url only if it is anonymous also

Parameters
Action$action

Definition at line 104 of file Lib.Http.php.

+ Here is the call graph for this function:

RedirectSender ( Action $action)

Definition at line 81 of file Lib.Http.php.

+ Here is the call graph for this function:

setHeaderCache (   $mime = "text/css")

set in cache one hour

Parameters
string$mime

Definition at line 302 of file Lib.Http.php.

SetHttpVar (   $name,
  $def 
)

Definition at line 150 of file Lib.Http.php.

← centre documentaire © anakeen