- String[] getCookies()
Usage: getCookies ( )
Returns all of the current server cookies
Parameters
Info
- Return:
an array containing all of the current server cookies
@
- Access:
public
- String getHeader()
Usage: getHeader ( $name )
Returns the value of the specified request header. If the request did
not include a header of the specified name, this method returns null.
Parameters
Info
- Return:
Get the value of the specified request header
@
- Access:
public
- String getLocale()
Usage: getLocale ( )
Get the accepting locale for the client. If no locale is
sent, use the default from the server
Parameters
Info
- Return:
The accepted locale of the client
@
- Access:
public
- String getMethod()
Usage: getMethod ( )
Return the method name of the http request.
Parameters
Info
- Return:
the method used -- GET or POST
- Access:
public
- String getParameter()
Usage: getParameter ( $name )
Get the value of the parameter. If it doesn't exist, null will be returned.
If it exists but is empty, it will be a string.
Parameters
- name $name - The key of the value in the parameters array
@
Info
- Return:
An object that is represented in one of the parameters
@
- Access:
public
- String[] getParameterNames()
Usage: getParameterNames ( )
Get the names of all the parameters as an array.
Parameters
Info
- Return:
An array of all of the parameter names
- Access:
public
- String getPathInfo()
Usage: getPathInfo ( )
Returns the information after the script name and before the query string
If the uri is /webapp/index.php/hello.php?foo=bar it would return /hello.php
Parameters
Info
- Return:
Returns a short version of the scriptPath
@
- Access:
public
- String getQueryString()
Usage: getQueryString ( )
Get the query string, which is the part of the Url after the first ?
Parameters
Info
- Return:
The query string after the URL of the request
@
- Access:
public
- String getRealPath()
Usage: getRealPath ( )
Get the file path on the server for the requested script
Parameters
Info
- Return:
Complete path to the requested script
@
- Access:
public
- String getRemoteAddr()
Usage: getRemoteAddr ( )
Get the IP address of the client
Parameters
Info
- Return:
The ip address of the client
@
- Access:
public
- String getRemoteHost()
Usage: getRemoteHost ( )
Get the qualified hostname of the client
If no qualified hostname exists, the IP address is used
Parameters
Info
- Return:
The hostname of the client
@
- Access:
public
- string getRequestUri()
Usage: getRequestUri ( )
Returns the part of this request's Url from the protocol name up to
the query string in the first line of the HTTP request.
Parameters
Info
- Return:
The requests URL
@
- Access:
public
- String getRequestUrl()
Usage: getRequestUrl ( )
Reconstructs the Url the client used to make the request.
The returned Url contains a protocol, server name, port number, and
server path, but it does not include query string parameters.
Parameters
Info
- Return:
Rebuilds and returns the path to the current server
@
- Access:
public
- String getScheme()
Usage: getScheme ( )
Returns the name of the scheme used to make this request, for example,
http, https, or ftp. Different schemes have different rules for
constructing URLs
Parameters
Info
- Return:
http or https, depending on whether or not we are in secure mode
- Access:
public
- String getScriptPath()
Usage: getScriptPath ( )
Returns the part of this request's Url that calls the script.
Parameters
Info
- Return:
The part of this request's Url that calls the script
@
- Access:
public
- String getServerName()
Usage: getServerName ( )
Get the qualified hostname of the server.
Parameters
Info
- Return:
The hostname of the server
@
- Access:
public
- int getServerPort()
Usage: getServerPort ( )
Get the port on which the request was made
Parameters
Info
- Return:
The port on which the request was made
@
- Access:
public
- Session getSession()
Usage: getSession ( )
Get the running session or create a new one if it doesn't exist
Parameters
Info
- Return:
a new instance of session, unless one already exists
@
- Singleton:
- Access:
public
- void HttpRequest()
Usage: HttpRequest ( )
Class constructor. Starts by loading up all of the HTTP variables into the parameter arrays
Parameters
Info
- boolean isSecure()
Usage: isSecure ( )
Determine if this was a secure requests.
The port used is a class constant
Parameters
Info
- Return:
true if we are in https (secure) mode
@
- Access:
public
- boolean parameterExists()
Usage: parameterExists ( $name )
Determine if parameter exists.
Parameters
- name $name - Key of the parameter to check
@
Info
- Return:
true iff the key exists and there is a real value
- Access:
public
- void removeParameter()
Usage: removeParameter ( $name )
Remove the specified request variable if it exists.
Parameters
- name $name - The key of the parameter you want to remove
Info
- void setParameter()
Usage: setParameter ( $name, $value )
Set the specified request variable to the specified value.
Parameters
- name $name - The key of the parameter
@
- value $value - The value of the parameter
Info