ILIAS  trunk Revision v11.0_alpha-1769-g99a433fe2dc
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilFileServicesDatabaseObjective Class Reference
+ Inheritance diagram for ilFileServicesDatabaseObjective:
+ Collaboration diagram for ilFileServicesDatabaseObjective:

Public Member Functions

 prepare (ilDBInterface $db)
 
 step_1 ()
 adds a new table to store data of file upload policies More...
 
- Public Member Functions inherited from ilDatabaseUpdateSteps
 prepare (\ilDBInterface $db)
 Prepare the execution of the steps. More...
 

Protected Member Functions

 abortIfNotPrepared ()
 

Protected Attributes

ilDBInterface $database = null
 

Detailed Description

Member Function Documentation

◆ abortIfNotPrepared()

ilFileServicesDatabaseObjective::abortIfNotPrepared ( )
protected
Exceptions
LogicExceptionif the database update steps were not yet prepared.

Definition at line 110 of file class.ilFileServicesDatabaseObjective.php.

References null.

Referenced by step_1().

110  : void
111  {
112  if (null === $this->database) {
113  throw new LogicException(self::class . "::prepare() must be called before db-update-steps execution.");
114  }
115  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the caller graph for this function:

◆ prepare()

ilFileServicesDatabaseObjective::prepare ( ilDBInterface  $db)

Definition at line 28 of file class.ilFileServicesDatabaseObjective.php.

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

◆ step_1()

ilFileServicesDatabaseObjective::step_1 ( )

adds a new table to store data of file upload policies

Definition at line 36 of file class.ilFileServicesDatabaseObjective.php.

References abortIfNotPrepared().

36  : void
37  {
38  $this->abortIfNotPrepared();
39 
40  if ($this->database->tableExists("il_upload_policy")) {
41  return;
42  }
43 
44  $this->database->createTable("il_upload_policy", [
45  "policy_id" => [
46  'type' => 'integer',
47  'length' => 8,
48  'notnull' => true,
49  ],
50  "title" => [
51  'type' => 'text',
52  'length' => 256,
53  'notnull' => true,
54  ],
55  "upload_limit_in_mb" => [
56  'type' => 'integer',
57  'length' => 8,
58  'notnull' => true,
59  ],
60  "audience" => [
61  'type' => 'text',
62  'length' => 512,
63  'notnull' => true,
64  ],
65  "audience_type" => [
66  'type' => 'integer',
67  'length' => 2,
68  'notnull' => true,
69  ],
70  "scope_definition" => [
71  'type' => 'text',
72  'length' => 512,
73  'notnull' => true,
74  ],
75  "active" => [
76  'type' => 'integer',
77  'length' => 1,
78  'notnull' => true,
79  ],
80  "valid_from" => [
81  'type' => 'date',
82  'notnull' => false,
83  ],
84  "valid_until" => [
85  'type' => 'date',
86  'notnull' => false,
87  ],
88  "owner" => [
89  'type' => 'integer',
90  'length' => 8,
91  'notnull' => true,
92  ],
93  "create_date" => [
94  'type' => 'timestamp',
95  'notnull' => true,
96  ],
97  "last_update" => [
98  'type' => 'timestamp',
99  'notnull' => true,
100  ]
101  ]);
102 
103  $this->database->createSequence("il_upload_policy");
104  }
+ Here is the call graph for this function:

Field Documentation

◆ $database

ilDBInterface ilFileServicesDatabaseObjective::$database = null
protected

Definition at line 26 of file class.ilFileServicesDatabaseObjective.php.


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