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

Description of class class. More...

+ Inheritance diagram for ilCalendarCopyDefinition:
+ Collaboration diagram for ilCalendarCopyDefinition:

Public Member Functions

 getCopyDefinitions ()
 Get copy definitions. More...
 
 setCopyDefinitions (array $a_definitions)
 Set copy definitions. More...
 
 getTempDir ()
 Get directory name located in /temp/ directory. More...
 
 setTempDir (string $temp_dir)
 Set directory name located in /temp/ directory. More...
 
 addCopyDefinition (string $a_source, string $a_target)
 Add copy definition. More...
 
 equals (Value $other)
 
 getHash ()
 
 serialize ()
 
 setValue ($value)
 
 unserialize ($serialized)
 
- Public Member Functions inherited from ILIAS\BackgroundTasks\Implementation\Values\AbstractValue
 getType ()
 
 getParentTask ()
 
 setParentTask (Task $parentTask)
 
 hasParentTask ()
 

Data Fields

const COPY_SOURCE_DIR = 'source'
 
const COPY_TARGET_DIR = 'target'
 

Private Attributes

array $copy_definitions = []
 Copy Jobs: source file => relative target file in zip directory. More...
 
string $temp_dir
 

Additional Inherited Members

- Protected Attributes inherited from ILIAS\BackgroundTasks\Implementation\Values\AbstractValue
Task $parentTask
 

Detailed Description

Description of class class.

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e

Definition at line 14 of file class.ilCalendarCopyDefinition.php.

Member Function Documentation

◆ addCopyDefinition()

ilCalendarCopyDefinition::addCopyDefinition ( string  $a_source,
string  $a_target 
)

Add copy definition.

Definition at line 70 of file class.ilCalendarCopyDefinition.php.

Referenced by ilDownloadFilesBackgroundTask\collectFiles().

70  : void
71  {
72  $this->copy_definitions[] =
73  [
74  self::COPY_SOURCE_DIR => $a_source,
75  self::COPY_TARGET_DIR => $a_target
76  ];
77  }
+ Here is the caller graph for this function:

◆ equals()

ilCalendarCopyDefinition::equals ( Value  $other)

Implements ILIAS\BackgroundTasks\Value.

Definition at line 82 of file class.ilCalendarCopyDefinition.php.

References ILIAS\BackgroundTasks\Value\getHash(), and getHash().

82  : bool
83  {
84  return strcmp($this->getHash(), $other->getHash()) === 0;
85  }
+ Here is the call graph for this function:

◆ getCopyDefinitions()

ilCalendarCopyDefinition::getCopyDefinitions ( )

Get copy definitions.

Returns
ilCalendarCopyDefinition[]

Definition at line 35 of file class.ilCalendarCopyDefinition.php.

References $copy_definitions.

Referenced by ilCalendarCopyFilesToTempDirectoryJob\copyFiles(), and serialize().

35  : array
36  {
38  }
array $copy_definitions
Copy Jobs: source file => relative target file in zip directory.
+ Here is the caller graph for this function:

◆ getHash()

ilCalendarCopyDefinition::getHash ( )

Implements ILIAS\BackgroundTasks\Value.

Definition at line 90 of file class.ilCalendarCopyDefinition.php.

References serialize().

Referenced by equals().

90  : string
91  {
92  return md5($this->serialize());
93  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTempDir()

ilCalendarCopyDefinition::getTempDir ( )

Get directory name located in /temp/ directory.

Returns
string

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

References $temp_dir.

Referenced by serialize().

53  : string
54  {
55  return $this->temp_dir;
56  }
+ Here is the caller graph for this function:

◆ serialize()

ilCalendarCopyDefinition::serialize ( )

Definition at line 98 of file class.ilCalendarCopyDefinition.php.

References getCopyDefinitions(), and getTempDir().

Referenced by getHash().

99  {
100  return serialize(
101  [
102  "copy_definition" => $this->getCopyDefinitions(),
103  "temp_dir" => $this->getTempDir()
104  ]
105  );
106  }
getCopyDefinitions()
Get copy definitions.
getTempDir()
Get directory name located in /temp/ directory.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setCopyDefinitions()

ilCalendarCopyDefinition::setCopyDefinitions ( array  $a_definitions)

Set copy definitions.

Parameters
ilCalendarCopyDefinition[]$a_definitions

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

Referenced by unserialize().

44  : void
45  {
46  $this->copy_definitions = $a_definitions;
47  }
+ Here is the caller graph for this function:

◆ setTempDir()

ilCalendarCopyDefinition::setTempDir ( string  $temp_dir)

Set directory name located in /temp/ directory.

Parameters
string$temp_dir

Definition at line 62 of file class.ilCalendarCopyDefinition.php.

References $temp_dir.

Referenced by unserialize().

62  : void
63  {
64  $this->temp_dir = $temp_dir;
65  }
+ Here is the caller graph for this function:

◆ setValue()

ilCalendarCopyDefinition::setValue (   $value)

Implements ILIAS\BackgroundTasks\Value.

Definition at line 111 of file class.ilCalendarCopyDefinition.php.

111  : void
112  {
113  $this->copy_definitions = $value;
114  }

◆ unserialize()

ilCalendarCopyDefinition::unserialize (   $serialized)

Definition at line 119 of file class.ilCalendarCopyDefinition.php.

References setCopyDefinitions(), and setTempDir().

120  {
121  $elements = unserialize($serialized);
122 
123  $this->setCopyDefinitions($elements["copy_definition"]);
124  $this->setTempDir($elements['temp_dir']);
125  }
setCopyDefinitions(array $a_definitions)
Set copy definitions.
setTempDir(string $temp_dir)
Set directory name located in /temp/ directory.
+ Here is the call graph for this function:

Field Documentation

◆ $copy_definitions

array ilCalendarCopyDefinition::$copy_definitions = []
private

Copy Jobs: source file => relative target file in zip directory.

Parameters
ilCalendarCopyDefinition[]

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

Referenced by getCopyDefinitions().

◆ $temp_dir

string ilCalendarCopyDefinition::$temp_dir
private

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

Referenced by getTempDir(), and setTempDir().

◆ COPY_SOURCE_DIR

const ilCalendarCopyDefinition::COPY_SOURCE_DIR = 'source'

◆ COPY_TARGET_DIR

const ilCalendarCopyDefinition::COPY_TARGET_DIR = 'target'

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