| 
|   | __construct (private ?string $forwarded_header=null, private ?string $forwarded_proto=null) | 
|   | 
|   | create () | 
|   | Creates a new ServerRequest object with the help of the underlying library.  More...
  | 
|   | 
Definition at line 38 of file RequestFactoryImpl.php.
 
◆ __construct()
      
        
          | ILIAS\HTTP\Request\RequestFactoryImpl::__construct  | 
          ( | 
          private ?string  | 
          $forwarded_header = null,  | 
        
        
           | 
           | 
          private ?string  | 
          $forwarded_proto = null  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
 
◆ create()
      
        
          | ILIAS\HTTP\Request\RequestFactoryImpl::create  | 
          ( | 
           | ) | 
           | 
        
      
 
Creates a new ServerRequest object with the help of the underlying library. 
Implements ILIAS\HTTP\Request\RequestFactory.
Definition at line 49 of file RequestFactoryImpl.php.
   49                             : ServerRequestInterface
    51         $server_request = ServerRequest::fromGlobals();
    53         if ($this->forwarded_header !== null && $this->forwarded_proto !== null) {
    55                 $this->forwarded_proto,
    56                 $server_request->getHeader($this->forwarded_header),
    59                 return $server_request->withUri($server_request->getUri()->withScheme($this->forwarded_proto));
    63             $header_names = array_keys($server_request->getHeaders());
    64             foreach ($header_names as $header_name) {
    65                 if (str_replace(
"-", 
"_", strtoupper($header_name)) !== $this->forwarded_header) {
    68                 if (!in_array($this->forwarded_proto, $server_request->getHeader($header_name), 
true)) {
    71                 return $server_request->withUri($server_request->getUri()->withScheme($this->forwarded_proto));
    75         return $server_request;
  
 
 
◆ DEFAULT_FORWARDED_HEADER
  
  
      
        
          | const ILIAS\HTTP\Request\RequestFactoryImpl::DEFAULT_FORWARDED_HEADER = 'X-Forwarded-Proto' | 
         
       
   | 
  
private   | 
  
 
 
◆ DEFAULT_FORWARDED_PROTO
  
  
      
        
          | const ILIAS\HTTP\Request\RequestFactoryImpl::DEFAULT_FORWARDED_PROTO = 'https' | 
         
       
   | 
  
private   | 
  
 
 
The documentation for this class was generated from the following file: