ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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 ($a_definitions)
 Set copy definitions. More...
 
 getTempDir ()
 Get directory name located in /temp/ directory. More...
 
 setTempDir ($temp_dir)
 Set directory name located in /temp/ directory. More...
 
 addCopyDefinition ($a_source, $a_target)
 Add copy definition. More...
 
 equals (Value $other)
 Check equality. More...
 
 getHash ()
 Get hash. More...
 
 serialize ()
 Serialize content. More...
 
 setValue ($value)
 Set value. More...
 
 unserialize ($serialized)
 Unserialize definitions. 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

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

Additional Inherited Members

- Protected Attributes inherited from ILIAS\BackgroundTasks\Implementation\Values\AbstractValue
 $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 (   $a_source,
  $a_target 
)

Add copy definition.

Parameters
string$a_source
string$a_target

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

75 {
76 $this->copy_definitions[] =
77 [
78 self::COPY_SOURCE_DIR => $a_source,
79 self::COPY_TARGET_DIR => $a_target
80 ];
81 }

Referenced by ilDownloadFilesBackgroundTask\collectFiles().

+ Here is the caller graph for this function:

◆ equals()

ilCalendarCopyDefinition::equals ( Value  $other)

Check equality.

Parameters
Value$other
Returns
bool

Implements ILIAS\BackgroundTasks\Value.

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

90 {
91 return strcmp($this->getHash(), $other->getHash());
92 }

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

+ Here is the call graph for this function:

◆ getCopyDefinitions()

ilCalendarCopyDefinition::getCopyDefinitions ( )

Get copy definitions.

Returns
string[]

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

38 {
40 }
$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 ( )

Get hash.

Returns
string

Implements ILIAS\BackgroundTasks\Value.

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

100 {
101 return md5($this->serialize());
102 }

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 55 of file class.ilCalendarCopyDefinition.php.

References $temp_dir.

Referenced by serialize().

+ Here is the caller graph for this function:

◆ serialize()

ilCalendarCopyDefinition::serialize ( )

Serialize content.

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

108 {
109 return serialize(
110 [
111 "copy_definition" => $this->getCopyDefinitions(),
112 "temp_dir" => $this->getTempDir()
113 ]
114 );
115 }
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 (   $a_definitions)

Set copy definitions.

Parameters
string[]$a_definitions

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

47 {
48 $this->copy_definitions = $a_definitions;
49 }

Referenced by unserialize().

+ Here is the caller graph for this function:

◆ setTempDir()

ilCalendarCopyDefinition::setTempDir (   $temp_dir)

Set directory name located in /temp/ directory.

Parameters
$temp_dir

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

65 {
66 $this->temp_dir = $temp_dir;
67 }

References $temp_dir.

Referenced by unserialize().

+ Here is the caller graph for this function:

◆ setValue()

ilCalendarCopyDefinition::setValue (   $value)

Set value.

Parameters
string[]$value

Implements ILIAS\BackgroundTasks\Value.

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

122 {
123 $this->copy_definitions = $value;
124 }

◆ unserialize()

ilCalendarCopyDefinition::unserialize (   $serialized)

Unserialize definitions.

Parameters
string$serialized

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

131 {
132 $elements = unserialize($serialized);
133
134 $this->setCopyDefinitions($elements["copy_definition"]);
135 $this->setTempDir($elements['temp_dir']);
136 }
unserialize($serialized)
Unserialize definitions.
setTempDir($temp_dir)
Set directory name located in /temp/ directory.
setCopyDefinitions($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

ilCalendarCopyDefinition::$copy_definitions = []
private

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

Parameters
string[]

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

Referenced by getCopyDefinitions().

◆ $temp_dir

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: