ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilCtrlDatabaseUpdateSteps Class Reference

Class ilCtrlDatabaseUpdateSteps holds the database update- steps affecting ilCtrl tables. More...

+ Inheritance diagram for ilCtrlDatabaseUpdateSteps:
+ Collaboration diagram for ilCtrlDatabaseUpdateSteps:

Public Member Functions

 prepare (ilDBInterface $db)
 
 step_1 ()
 Deletes the table 'ctrl_calls' from the database, as it is no longer needed. More...
 
 step_2 ()
 Deletes the table 'ctrl_classfile' from the database, as it is no longer needed. More...
 
 step_3 ()
 Deletes the table 'ctrl_structure' from the database, as it is no longer needed. More...
 
 step_4 ()
 Deletes the table 'il_request_token' from the database, since tokens are now stored in the ILIAS session. More...
 
 step_5 ()
 Deletes the table 'service_class' from the database, since information is now stored in an artifact. More...
 
 step_6 ()
 Deletes the table 'module_class' from the database, since information is now stored in an artifact. More...
 
- Public Member Functions inherited from ilDatabaseUpdateSteps
 prepare (\ilDBInterface $db)
 Prepare the execution of the steps. More...
 

Private Member Functions

 abortIfNotPrepared ()
 Halts the execution of these update steps if no database was provided. More...
 

Private Attributes

ilDBInterface $database = null
 

Detailed Description

Class ilCtrlDatabaseUpdateSteps holds the database update- steps affecting ilCtrl tables.

Author
Thibeau Fuhrer thf@s.nosp@m.tude.nosp@m.r-rai.nosp@m.mann.nosp@m..ch

Definition at line 13 of file class.ilCtrlDatabaseUpdateSteps.php.

Member Function Documentation

◆ abortIfNotPrepared()

ilCtrlDatabaseUpdateSteps::abortIfNotPrepared ( )
private

Halts the execution of these update steps if no database was provided.

Exceptions
LogicExceptionif the database update steps were not yet prepared.

Definition at line 107 of file class.ilCtrlDatabaseUpdateSteps.php.

Referenced by step_1(), step_2(), step_3(), step_4(), step_5(), and step_6().

107  : void
108  {
109  if (null === $this->database) {
110  throw new LogicException(self::class . "::prepare() must be called before db-update-steps execution.");
111  }
112  }
+ Here is the caller graph for this function:

◆ prepare()

ilCtrlDatabaseUpdateSteps::prepare ( ilDBInterface  $db)

Definition at line 23 of file class.ilCtrlDatabaseUpdateSteps.php.

23  : void
24  {
25  $this->database = $db;
26  }

◆ step_1()

ilCtrlDatabaseUpdateSteps::step_1 ( )

Deletes the table 'ctrl_calls' from the database, as it is no longer needed.

Definition at line 32 of file class.ilCtrlDatabaseUpdateSteps.php.

References abortIfNotPrepared().

32  : void
33  {
34  $this->abortIfNotPrepared();
35  if ($this->database->tableExists('ctrl_calls')) {
36  $this->database->dropTable('ctrl_calls');
37  }
38  }
abortIfNotPrepared()
Halts the execution of these update steps if no database was provided.
+ Here is the call graph for this function:

◆ step_2()

ilCtrlDatabaseUpdateSteps::step_2 ( )

Deletes the table 'ctrl_classfile' from the database, as it is no longer needed.

Definition at line 44 of file class.ilCtrlDatabaseUpdateSteps.php.

References abortIfNotPrepared().

44  : void
45  {
46  $this->abortIfNotPrepared();
47  if ($this->database->tableExists('ctrl_classfile')) {
48  $this->database->dropTable('ctrl_classfile');
49  }
50  }
abortIfNotPrepared()
Halts the execution of these update steps if no database was provided.
+ Here is the call graph for this function:

◆ step_3()

ilCtrlDatabaseUpdateSteps::step_3 ( )

Deletes the table 'ctrl_structure' from the database, as it is no longer needed.

Definition at line 56 of file class.ilCtrlDatabaseUpdateSteps.php.

References abortIfNotPrepared().

56  : void
57  {
58  $this->abortIfNotPrepared();
59  if ($this->database->tableExists('ctrl_structure')) {
60  $this->database->dropTable('ctrl_structure');
61  }
62  }
abortIfNotPrepared()
Halts the execution of these update steps if no database was provided.
+ Here is the call graph for this function:

◆ step_4()

ilCtrlDatabaseUpdateSteps::step_4 ( )

Deletes the table 'il_request_token' from the database, since tokens are now stored in the ILIAS session.

Definition at line 68 of file class.ilCtrlDatabaseUpdateSteps.php.

References abortIfNotPrepared().

68  : void
69  {
70  $this->abortIfNotPrepared();
71  if ($this->database->tableExists('il_request_token')) {
72  $this->database->dropTable('il_request_token');
73  }
74  }
abortIfNotPrepared()
Halts the execution of these update steps if no database was provided.
+ Here is the call graph for this function:

◆ step_5()

ilCtrlDatabaseUpdateSteps::step_5 ( )

Deletes the table 'service_class' from the database, since information is now stored in an artifact.

Definition at line 80 of file class.ilCtrlDatabaseUpdateSteps.php.

References abortIfNotPrepared().

80  : void
81  {
82  $this->abortIfNotPrepared();
83  if ($this->database->tableExists('service_class')) {
84  $this->database->dropTable('service_class');
85  }
86  }
abortIfNotPrepared()
Halts the execution of these update steps if no database was provided.
+ Here is the call graph for this function:

◆ step_6()

ilCtrlDatabaseUpdateSteps::step_6 ( )

Deletes the table 'module_class' from the database, since information is now stored in an artifact.

Definition at line 92 of file class.ilCtrlDatabaseUpdateSteps.php.

References abortIfNotPrepared().

92  : void
93  {
94  $this->abortIfNotPrepared();
95  if ($this->database->tableExists('module_class')) {
96  $this->database->dropTable('module_class');
97  }
98  }
abortIfNotPrepared()
Halts the execution of these update steps if no database was provided.
+ Here is the call graph for this function:

Field Documentation

◆ $database

ilDBInterface ilCtrlDatabaseUpdateSteps::$database = null
private

Definition at line 18 of file class.ilCtrlDatabaseUpdateSteps.php.


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