4 use Symfony\Component\HttpFoundation\Request as SymfonyRequest;
5 use Symfony\Component\HttpFoundation\ParameterBag;
6 use Symfony\Component\HttpFoundation\FileBag;
7 use Symfony\Component\HttpFoundation\ServerBag;
8 use Symfony\Component\HttpFoundation\HeaderBag;
47 array $cookies = array(), array
$files = array(), array $server = array(),
$content =
null) {
52 $this->files =
new FileBag(
$files);
53 $this->server =
new ServerBag($server);
54 $this->headers =
new HeaderBag($this->server->getHeaders());
57 $this->languages =
null;
58 $this->charsets =
null;
59 $this->encodings =
null;
60 $this->acceptableContentTypes =
null;
61 $this->pathInfo =
null;
62 $this->requestUri =
null;
63 $this->baseUrl =
null;
64 $this->basePath =
null;
79 $path = trim($this->query->get(
'__elgg_uri'),
'/');
81 $path = htmlspecialchars(
$path, ENT_QUOTES,
'UTF-8');
87 return explode(
'/',
$path);
100 return array_shift($segments);
110 $ip = parent::getClientIp();
112 if ($ip == $this->server->get(
'REMOTE_ADDR')) {
114 $ip_addresses = $this->server->get(
'HTTP_X_REAL_IP');
116 $ip_addresses = explode(
',', $ip_addresses);
117 return array_pop($ip_addresses);
128 return (strtolower($this->headers->get(
'X-Requested-With')) ===
'xmlhttprequest'
129 || $this->query->get(
'X-Requested-With') ===
'XMLHttpRequest'
130 || $this->request->get(
'X-Requested-With') ===
'XMLHttpRequest');
141 if (get_magic_quotes_gpc()) {
$content
Set robots.txt action.
stripSlashesIfMagicQuotes($data)
Strip slashes if magic quotes is on.
getUrlSegments($raw=false)
Get URL segments from the path info.
initialize(array $query=array(), array $request=array(), array $attributes=array(), array $cookies=array(), array $files=array(), array $server=array(), $content=null)
getFirstUrlSegment()
Get first URL segment from the path info.