ILIAS  release_8 Revision v8.24
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)
 @inheritDoc More...
 
 getHash ()
 @inheritDoc More...
 
 serialize ()
 @inheritDoc More...
 
 setValue ($value)
 @inheritDoc More...
 
 unserialize ($serialized)
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\BackgroundTasks\Implementation\Values\AbstractValue
 getType ()
 
 getParentTask ()
 
 setParentTask (Task $parentTask)
 
 hasParentTask ()
 
 getHash ()
 
 equals (Value $other)
 
 getType ()
 
 setParentTask (Task $parentTask)
 
 getParentTask ()
 
 hasParentTask ()
 
 setValue ($value)
 

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.

70 : void
71 {
72 $this->copy_definitions[] =
73 [
74 self::COPY_SOURCE_DIR => $a_source,
75 self::COPY_TARGET_DIR => $a_target
76 ];
77 }

Referenced by ilDownloadFilesBackgroundTask\collectFiles().

+ Here is the caller graph for this function:

◆ equals()

ilCalendarCopyDefinition::equals ( Value  $other)

@inheritDoc

Implements ILIAS\BackgroundTasks\Value.

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

82 : bool
83 {
84 return strcmp($this->getHash(), $other->getHash()) === 0;
85 }

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

+ 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.

35 : array
36 {
38 }
array $copy_definitions
Copy Jobs: source file => relative target file in zip directory.

References $copy_definitions.

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

+ Here is the caller graph for this function:

◆ getHash()

ilCalendarCopyDefinition::getHash ( )

@inheritDoc

Implements ILIAS\BackgroundTasks\Value.

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

90 : string
91 {
92 return md5($this->serialize());
93 }

References serialize().

Referenced by equals().

+ 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.

53 : string
54 {
55 return $this->temp_dir;
56 }

References $temp_dir.

Referenced by serialize().

+ Here is the caller graph for this function:

◆ serialize()

ilCalendarCopyDefinition::serialize ( )

@inheritDoc

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

99 {
100 return serialize(
101 [
102 "copy_definition" => $this->getCopyDefinitions(),
103 "temp_dir" => $this->getTempDir()
104 ]
105 );
106 }
getTempDir()
Get directory name located in /temp/ directory.

References getCopyDefinitions(), getTempDir(), and serialize().

Referenced by getHash(), and serialize().

+ 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.

44 : void
45 {
46 $this->copy_definitions = $a_definitions;
47 }

Referenced by unserialize().

+ 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.

62 : void
63 {
64 $this->temp_dir = $temp_dir;
65 }

References $temp_dir.

Referenced by unserialize().

+ Here is the caller graph for this function:

◆ setValue()

ilCalendarCopyDefinition::setValue (   $value)

@inheritDoc

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)

@inheritDoc

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

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

References setCopyDefinitions(), setTempDir(), and unserialize().

Referenced by unserialize().

+ Here is the call graph for this function:
+ Here is the caller 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: