ILIAS  release_7 Revision v7.30-3-g800a261c036
ILIAS\Init\StartupSequence\StartUpSequenceDispatcher Class Reference
+ Collaboration diagram for ILIAS\Init\StartupSequence\StartUpSequenceDispatcher:

Public Member Functions

 __construct (Container $dic)
 
 dispatch ()
 

Protected Member Functions

 initSequence ()
 
 storeRequest ()
 

Private Attributes

 $dic
 
 $sequence = []
 

Detailed Description

Definition at line 20 of file StartUpSequenceDispatcher.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Init\StartupSequence\StartUpSequenceDispatcher::__construct ( Container  $dic)

Member Function Documentation

◆ dispatch()

ILIAS\Init\StartupSequence\StartUpSequenceDispatcher::dispatch ( )
Returns
boolean

Definition at line 69 of file StartUpSequenceDispatcher.php.

69 : bool
70 {
71 $this->dic->logger()->init()->debug('Started request interception checks ...');
72
73 if (defined('IL_CERT_SSO')) {
74 $this->dic->logger()->init()->debug('ApacheAuthentication request. No interception.');
75 return false;
76 } elseif (!ilContext::supportsRedirects()) {
77 $this->dic->logger()->init()->debug('Context does not support redirects. No interception.');
78 return false;
79 } elseif ($this->dic->ctrl()->isAsynch()) {
80 $this->dic->logger()->init()->debug('Async request. No interception.');
81 return false;
82 } elseif (in_array(basename($_SERVER['PHP_SELF']), array('logout.php'))) {
83 $this->dic->logger()->init()->debug('Logout request. No interception.');
84 return false;
85 } elseif (!$this->dic->user()->getId() || $this->dic->user()->isAnonymous()) {
86 $this->dic->logger()->init()->debug('Anonymous request. No interception.');
87 return false;
88 } elseif (ilSession::get(__CLASS__ . '_passed')) {
89 $this->dic->logger()->init()->debug(__CLASS__ . ' already passed in the current user session.');
90 return false;
91 }
92
93
94 $this->sequence->rewind();
95 while (!$this->sequence->isEmpty()) {
96 $step = $this->sequence->shift();
97
98 if ($step->isInFulfillment()) {
99 $this->dic->logger()->init()->debug('Step is in fulfillment:' . get_class($step));
100 return false;
101 }
102
103 if ($step->shouldInterceptRequest()) {
104 $this->dic->logger()->init()->debug('Step required adjustment:' . get_class($step));
105 if ($step->shouldStoreRequestTarget()) {
106 $this->storeRequest();
107 }
108 $step->execute();
109 return true;
110 }
111 }
112
113 ilSession::set(__CLASS__ . '_passed', 1);
114 return false;
115 }
static supportsRedirects()
Are redirects supported?
static set($a_var, $a_val)
Set a value.
static get($a_var)
Get a value.
$_SERVER['HTTP_HOST']
Definition: raiseError.php:10

References $_SERVER, ilSession\get(), ilSession\set(), ILIAS\Init\StartupSequence\StartUpSequenceDispatcher\storeRequest(), and ilContext\supportsRedirects().

+ Here is the call graph for this function:

◆ initSequence()

ILIAS\Init\StartupSequence\StartUpSequenceDispatcher::initSequence ( )
protected

Definition at line 36 of file StartUpSequenceDispatcher.php.

36 : void
37 {
38 $this->sequence = new SplQueue();
39 $this->sequence->push(new ilTermsOfServiceWithdrawalStartUpStep(
40 $this->dic
41 ));
42 $this->sequence->push(new ilTermsOfServiceAcceptanceStartUpStep(
43 $this->dic
44 ));
45 $this->sequence->push(new ilUserProfileStartUpStep(
46 $this->dic->user(),
47 $this->dic->ctrl()
48 ));
49 $this->sequence->push(new ilForcedUserPasswordChangeStartUpStep(
50 $this->dic->user(),
51 $this->dic->ctrl(),
52 $this->dic->http()->request()
53 ));
54 }
Class ilUserProfileStartUpStep.

Referenced by ILIAS\Init\StartupSequence\StartUpSequenceDispatcher\__construct().

+ Here is the caller graph for this function:

◆ storeRequest()

ILIAS\Init\StartupSequence\StartUpSequenceDispatcher::storeRequest ( )
protected

Definition at line 56 of file StartUpSequenceDispatcher.php.

56 : void
57 {
58 if (!ilSession::get('orig_request_target')) {
59 //#16324 don't use the complete REQUEST_URI
60 $url = substr($_SERVER['REQUEST_URI'], (strrpos($_SERVER['REQUEST_URI'], '/') + 1));
61
62 ilSession::set('orig_request_target', $url);
63 }
64 }
$url

References $_SERVER, $url, ilSession\get(), and ilSession\set().

Referenced by ILIAS\Init\StartupSequence\StartUpSequenceDispatcher\dispatch().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $dic

ILIAS\Init\StartupSequence\StartUpSequenceDispatcher::$dic
private

◆ $sequence

ILIAS\Init\StartupSequence\StartUpSequenceDispatcher::$sequence = []
private

Definition at line 25 of file StartUpSequenceDispatcher.php.


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