ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
ilCtrlStructureStoredObjective Class Reference
+ Inheritance diagram for ilCtrlStructureStoredObjective:
+ Collaboration diagram for ilCtrlStructureStoredObjective:

Public Member Functions

 __construct (\ilCtrlStructureReader $ctrl_reader, bool $populate_before=true)
 
 getHash ()
 
 getLabel ()
 
 isNotable ()
 
 getPreconditions (Setup\Environment $environment)
 
 achieve (Setup\Environment $environment)
 

Data Fields

const TABLE_CLASSFILES = "ctrl_classfile"
 
const TABLE_CALLS = "ctrl_calls"
 

Protected Attributes

 $ctrl_reader
 
 $populate_before
 

Detailed Description

Definition at line 5 of file class.ilCtrlStructureStoredObjective.php.

Constructor & Destructor Documentation

◆ __construct()

ilCtrlStructureStoredObjective::__construct ( \ilCtrlStructureReader  $ctrl_reader,
bool  $populate_before = true 
)

Member Function Documentation

◆ achieve()

ilCtrlStructureStoredObjective::achieve ( Setup\Environment  $environment)

Definition at line 64 of file class.ilCtrlStructureStoredObjective.php.

References $reader, and ILIAS\Setup\Environment\getResource().

64  : Setup\Environment
65  {
66  $db = $environment->getResource(Setup\Environment::RESOURCE_DATABASE);
67  if (!$db) {
68  throw new \UnachievableException("Need DB to store control-structure");
69  }
70 
71  if (!defined("ILIAS_ABSOLUTE_PATH")) {
72  define("ILIAS_ABSOLUTE_PATH", dirname(__FILE__, 5));
73  }
74 
75  $reader = $this->ctrl_reader->withDB($db);
76  $reader->executed = false;
77  $reader->readStructure(true);
78  return $environment;
79  }
+ Here is the call graph for this function:

◆ getHash()

ilCtrlStructureStoredObjective::getHash ( )

Definition at line 29 of file class.ilCtrlStructureStoredObjective.php.

29  : string
30  {
31  return hash("sha256", self::class);
32  }

◆ getLabel()

ilCtrlStructureStoredObjective::getLabel ( )

Definition at line 37 of file class.ilCtrlStructureStoredObjective.php.

37  : string
38  {
39  return "ilCtrl-structure is read and stored.";
40  }

◆ getPreconditions()

ilCtrlStructureStoredObjective::getPreconditions ( Setup\Environment  $environment)

Definition at line 53 of file class.ilCtrlStructureStoredObjective.php.

References $config.

53  : array
54  {
55  $config = $environment->getConfigFor('database');
56  return [
57  new \ilDatabaseUpdatedObjective($config, $this->populate_before)
58  ];
59  }
if(!array_key_exists('PATH_INFO', $_SERVER)) $config
Definition: metadata.php:68

◆ isNotable()

ilCtrlStructureStoredObjective::isNotable ( )

Definition at line 45 of file class.ilCtrlStructureStoredObjective.php.

45  : bool
46  {
47  return true;
48  }

Field Documentation

◆ $ctrl_reader

ilCtrlStructureStoredObjective::$ctrl_reader
protected

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

Referenced by __construct().

◆ $populate_before

ilCtrlStructureStoredObjective::$populate_before
protected

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

Referenced by __construct().

◆ TABLE_CALLS

const ilCtrlStructureStoredObjective::TABLE_CALLS = "ctrl_calls"

Definition at line 8 of file class.ilCtrlStructureStoredObjective.php.

◆ TABLE_CLASSFILES

const ilCtrlStructureStoredObjective::TABLE_CLASSFILES = "ctrl_classfile"

Definition at line 7 of file class.ilCtrlStructureStoredObjective.php.


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