Go to the documentation of this file.
49 public function getCookie( $key, $prefix =
null, $default =
null ) {
50 return $this->base->getCookie( $key, $prefix, $default );
54 return $this->base->getHeader( $name, $flags );
58 return $this->base->getAllHeaders();
62 return $this->base->getSession();
66 return $this->base->getSessionData( $key );
70 $this->base->setSessionData( $key,
$data );
74 return $this->base->getAcceptLang();
78 return $this->ip ?: $this->base->getIP();
86 return $this->base->getProtocol();
90 return $this->base->getElapsedTime();
Similar to FauxRequest, but only fakes URL parameters and method (POST or GET) and use the base reque...
WebRequest clone which takes values from a provided array.
getAllHeaders()
Get an array containing all request headers.
array $data
The parameters from $_GET, $_POST and the path router.
setSessionData( $key, $data)
Set session data.
getIP()
Work out the IP address based on various globals For trusted proxies, use the XFF client IP (first of...
getAcceptLang()
Parse the Accept-Language header sent by the client into an array.
getSessionData( $key)
Get data from the session.
getProtocol()
Get the current URL protocol (http or https)
getElapsedTime()
Get the number of seconds to have elapsed since request start, in fractional seconds,...
getHeader( $name, $flags=0)
Get a request header, or false if it isn't set.
The WebRequest class encapsulates getting at data passed in the URL or via a POSTed form stripping il...
getSession()
Return the session for this request.
__construct(WebRequest $base, $data, $wasPosted=false)
getCookie( $key, $prefix=null, $default=null)
Get a cookie from the $_COOKIE jar.