ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
HttpAdapter.php
Go to the documentation of this file.
1 <?php
2 
3 namespace SimpleSAML\Utils;
4 
11 {
15  public function getServerHTTPS()
16  {
17  return HTTP::getServerHTTPS();
18  }
19 
23  public function getServerPort()
24  {
25  return HTTP::getServerPort();
26  }
27 
31  public function addURLParameters($url, $parameters)
32  {
33  return HTTP::addURLParameters($url, $parameters);
34  }
35 
39  public function checkSessionCookie($retryURL = null)
40  {
42  }
43 
47  public function checkURLAllowed($url, array $trustedSites = null)
48  {
49  return HTTP::checkURLAllowed($url, $trustedSites);
50  }
51 
55  public function fetch($url, $context = array(), $getHeaders = false)
56  {
57  return HTTP::fetch($url, $context, $getHeaders);
58  }
59 
63  public function getAcceptLanguage()
64  {
65  return HTTP::getAcceptLanguage();
66  }
67 
71  public function guessBasePath()
72  {
73  return HTTP::guessBasePath();
74  }
75 
79  public function getBaseURL()
80  {
81  return HTTP::getBaseURL();
82  }
83 
87  public function getFirstPathElement($trailingslash = true)
88  {
89  return HTTP::getFirstPathElement($trailingslash);
90  }
91 
96  {
98  }
99 
103  public function getSelfHost()
104  {
105  return HTTP::getSelfHost();
106  }
107 
112  {
113  return HTTP::getSelfHostWithNonStandardPort();
114  }
115 
119  public function getSelfHostWithPath()
120  {
121  return HTTP::getSelfHostWithPath();
122  }
123 
127  public function getSelfURL()
128  {
129  return HTTP::getSelfURL();
130  }
131 
135  public function getSelfURLHost()
136  {
137  return HTTP::getSelfURLHost();
138  }
139 
143  public function getSelfURLNoQuery()
144  {
145  return HTTP::getSelfURLNoQuery();
146  }
147 
151  public function isHTTPS()
152  {
153  return HTTP::isHTTPS();
154  }
155 
159  public function normalizeURL($url)
160  {
161  return HTTP::normalizeURL($url);
162  }
163 
167  public function parseQueryString($query_string)
168  {
169  return HTTP::parseQueryString($query_string);
170  }
171 
175  public function redirectTrustedURL($url, $parameters = array())
176  {
177  HTTP::redirectTrustedURL($url, $parameters);
178  }
179 
183  public function redirectUntrustedURL($url, $parameters = array())
184  {
185  HTTP::redirectUntrustedURL($url, $parameters);
186  }
187 
191  public function resolveURL($url, $base = null)
192  {
193  return HTTP::resolveURL($url, $base);
194  }
195 
199  public function setCookie($name, $value, $params = null, $throw = true)
200  {
201  HTTP::setCookie($name, $value, $params, $throw);
202  }
203 
208  {
210  }
211 }
$context
Definition: webdav.php:25
static checkURLAllowed($url, array $trustedSites=null)
Check if a URL is valid and is in our list of allowed URLs.
Definition: HTTP.php:321
static getServerHTTPS()
Retrieve HTTPS status from $_SERVER environment variables.
Definition: HTTP.php:84
static normalizeURL($url)
Normalizes a URL to an absolute URL and validate it.
Definition: HTTP.php:880
getFirstPathElement($trailingslash=true)
Definition: HttpAdapter.php:87
$destination
getPOSTRedirectURL($destination, $data)
Definition: HttpAdapter.php:95
checkSessionCookie($retryURL=null)
Definition: HttpAdapter.php:39
static redirectTrustedURL($url, $parameters=array())
This function redirects to the specified URL without performing any security checks.
Definition: HTTP.php:959
parseQueryString($query_string)
static redirectUntrustedURL($url, $parameters=array())
This function redirects to the specified URL after performing the appropriate security checks on it...
Definition: HTTP.php:991
static isHTTPS()
This function checks if we are using HTTPS as protocol.
Definition: HTTP.php:862
$base
Definition: index.php:4
checkURLAllowed($url, array $trustedSites=null)
Definition: HttpAdapter.php:47
static parseQueryString($query_string)
Parse a query string into an array.
Definition: HTTP.php:912
static setCookie($name, $value, $params=null, $throw=true)
Set a cookie.
Definition: HTTP.php:1104
static getSelfURLNoQuery()
Retrieve the current URL using the base URL in the configuration, without the query parameters...
Definition: HTTP.php:843
static resolveURL($url, $base=null)
Resolve a (possibly relative) URL relative to a given base URL.
Definition: HTTP.php:1023
static getSelfHost()
Retrieve our own host.
Definition: HTTP.php:697
static submitPOSTData($destination, $data)
Submit a POST form to a specific destination.
Definition: HTTP.php:1202
static getSelfHostWithPath()
Retrieve our own host together with the URL path.
Definition: HTTP.php:736
static fetch($url, $context=array(), $getHeaders=false)
Helper function to retrieve a file or URL with proxy support, also supporting proxy basic authorizati...
Definition: HTTP.php:408
redirectTrustedURL($url, $parameters=array())
static getAcceptLanguage()
This function parses the Accept-Language HTTP header and returns an associative array with each langu...
Definition: HTTP.php:498
addURLParameters($url, $parameters)
Definition: HttpAdapter.php:31
redirectUntrustedURL($url, $parameters=array())
static getServerPort()
Retrieve the port number from $_SERVER environment variables.
Definition: HTTP.php:109
resolveURL($url, $base=null)
fetch($url, $context=array(), $getHeaders=false)
Definition: HttpAdapter.php:55
static guessBasePath()
Try to guess the base SimpleSAMLphp path from the current request.
Definition: HTTP.php:562
static checkSessionCookie($retryURL=null)
Check for session cookie, and show missing-cookie page if it is missing.
Definition: HTTP.php:286
static getFirstPathElement($trailingslash=true)
Retrieve the first element of the URL path.
Definition: HTTP.php:645
$url
submitPOSTData($destination, $data)
static getPOSTRedirectURL($destination, $data)
Create a link which will POST data.
Definition: HTTP.php:666
static getBaseURL()
Retrieve the base URL of the SimpleSAMLphp installation.
Definition: HTTP.php:597
$data
Definition: bench.php:6
setCookie($name, $value, $params=null, $throw=true)