ILIAS  trunk Revision v11.0_alpha-1851-ga8564da6fed
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
InitHttpServices Class Reference

Responsible for loading the HTTP Service into the dependency injection container of ILIAS. More...

+ Collaboration diagram for InitHttpServices:

Public Member Functions

 init (Container $container)
 

Detailed Description

Responsible for loading the HTTP Service into the dependency injection container of ILIAS.

Definition at line 31 of file InitHttpServices.php.

Member Function Documentation

◆ init()

InitHttpServices::init ( Container  $container)

Definition at line 33 of file InitHttpServices.php.

References $c, and null.

33  : void
34  {
35  $container['http.request_factory'] = static function (Container $c): RequestFactoryImpl {
36  $header = null;
37  $value = null;
38 
39  if (
40  isset($c['ilIliasIniFile'])
41  && (bool) $c->iliasIni()->readVariable('https', 'auto_https_detect_enabled')
42  ) {
43  $header = (string) $c->iliasIni()->readVariable('https', 'auto_https_detect_header_name');
44  $value = (string) $c->iliasIni()->readVariable('https', 'auto_https_detect_header_value');
45  $header = $header === '' ? null : $header;
46  $value = $value === '' ? null : $value;
47  }
48 
49  return new RequestFactoryImpl($header, $value);
50  };
51 
52  $container['http.response_factory'] = static fn($c): ResponseFactoryImpl => new ResponseFactoryImpl();
53 
54  $container['http.cookie_jar_factory'] = static fn($c): CookieJarFactoryImpl => new CookieJarFactoryImpl();
55 
56  $container['http.response_sender_strategy'] = static fn(
57  $c
59 
60  $container['http.duration_factory'] = static fn($c): DurationFactory => new DurationFactory(
61  new IncrementFactory()
62  );
63 
64  $container['http.security'] = static function ($c): void {
65  throw new OutOfBoundsException('TODO');
66  };
67 
68  $container['http'] = static fn($c): Services => new Services($c);
69  }
$c
Definition: deliver.php:25
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:35
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

The documentation for this class was generated from the following file: