ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\Cloud\RemoveCloudDBUpdate Class Reference
+ Inheritance diagram for ILIAS\Cloud\RemoveCloudDBUpdate:
+ Collaboration diagram for ILIAS\Cloud\RemoveCloudDBUpdate:

Public Member Functions

 prepare (\ilDBInterface $db)
 Prepare the execution of the steps. More...
 
 step_1 ()
 
 step_2 ()
 

Private Attributes

ilDBInterface $db = null
 

Detailed Description

Definition at line 23 of file RemoveCloudDBUpdate.php.

Member Function Documentation

◆ prepare()

ILIAS\Cloud\RemoveCloudDBUpdate::prepare ( \ilDBInterface  $db)

Prepare the execution of the steps.

Do not use anything from the globals or the DIC inside your steps, only use the instance of the database provided here.

Implements ilDatabaseUpdateSteps.

Definition at line 27 of file RemoveCloudDBUpdate.php.

References ILIAS\Cloud\RemoveCloudDBUpdate\$db.

27  : void
28  {
29  $this->db = $db;
30  }

◆ step_1()

ILIAS\Cloud\RemoveCloudDBUpdate::step_1 ( )

Definition at line 32 of file RemoveCloudDBUpdate.php.

32  : void
33  {
34  $this->db->dropTable('il_cld_data', false);
35  }

◆ step_2()

ILIAS\Cloud\RemoveCloudDBUpdate::step_2 ( )

Definition at line 37 of file RemoveCloudDBUpdate.php.

References $q, and $res.

37  : void
38  {
39  $q = "SELECT obj_id FROM object_data WHERE type = %s";
40  $res = $this->db->queryF($q, ['text'], ['cld']);
41  while ($row = $this->db->fetchAssoc($res)) {
42  $this->db->manipulateF('DELETE FROM object_data WHERE id = %s', ['integer'], [$row['obj_id']]);
43  $this->db->manipulateF('DELETE FROM object_reference WHERE object_id = %s', ['integer'], [$row['obj_id']]);
44  // tree?
45  }
46  }
$res
Definition: ltiservices.php:66
$q
Definition: shib_logout.php:21

Field Documentation

◆ $db

ilDBInterface ILIAS\Cloud\RemoveCloudDBUpdate::$db = null
private

Definition at line 25 of file RemoveCloudDBUpdate.php.

Referenced by ILIAS\Cloud\RemoveCloudDBUpdate\prepare().


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