ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 ()
 

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.

Referenced by ilDownloadFilesBackgroundTask\collectFiles().

75  {
76  $this->copy_definitions[] =
77  [
78  self::COPY_SOURCE_DIR => $a_source,
79  self::COPY_TARGET_DIR => $a_target
80  ];
81  }
+ 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.

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

90  {
91  return strcmp($this->getHash(), $other->getHash());
92  }
+ 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.

References $copy_definitions.

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

38  {
40  }
$copy_definitions
Copy Jobs: source file => relative target file in zip directory.
+ 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.

References serialize().

Referenced by equals().

100  {
101  return md5($this->serialize());
102  }
+ 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.

References getCopyDefinitions(), and getTempDir().

Referenced by getHash().

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

Set copy definitions.

Parameters
string[]$a_definitions

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

Referenced by unserialize().

47  {
48  $this->copy_definitions = $a_definitions;
49  }
+ 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.

References $temp_dir.

Referenced by unserialize().

65  {
66  $this->temp_dir = $temp_dir;
67  }
+ 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.

References setCopyDefinitions(), and setTempDir().

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