ILIAS  release_8 Revision v8.24
ilImportDirectoryFactory Class Reference
+ Collaboration diagram for ilImportDirectoryFactory:

Public Member Functions

 __construct ()
 
 getInstanceForComponent (string $type)
 

Data Fields

const TYPE_MOB = 'mob'
 
const TYPE_SAHS = 'sahs'
 
const TYPE_EXPORT = 'export'
 

Protected Attributes

ilLogger $logger
 
Filesystem $storage_directory
 

Detailed Description

Definition at line 7 of file class.ilImportDirectoryFactory.php.

Constructor & Destructor Documentation

◆ __construct()

ilImportDirectoryFactory::__construct ( )

Definition at line 16 of file class.ilImportDirectoryFactory.php.

17 {
18 global $DIC;
19
20 $this->logger = $DIC->logger()->exp();
21 $this->storage_directory = $DIC->filesystem()->storage();
22 }
global $DIC
Definition: feed.php:28

References $DIC, and ILIAS\Repository\logger().

+ Here is the call graph for this function:

Member Function Documentation

◆ getInstanceForComponent()

ilImportDirectoryFactory::getInstanceForComponent ( string  $type)

Definition at line 24 of file class.ilImportDirectoryFactory.php.

25 {
26 switch ($type) {
27 case self::TYPE_MOB:
28 $instance = new ilMediaObjectImportDirectory(
29 $this->storage_directory,
30 $this->logger
31 );
32 break;
33
34 case self::TYPE_SAHS:
35 $instance = new ilScormImportDirectory(
36 $this->storage_directory,
37 $this->logger
38 );
39 break;
40
42 $instance = new ilExportImportDirectory(
43 $this->storage_directory,
44 $this->logger
45 );
46 break;
47
48 default:
49 $this->logger->error('Invalid type given: ' . $type);
50 throw new DomainException(
51 'Invalid type given: ' . $type
52 );
53 }
54 return $instance;
55 }
Import directory interface.
$type

References $type, ILIAS\Repository\logger(), TYPE_EXPORT, TYPE_MOB, and TYPE_SAHS.

+ Here is the call graph for this function:

Field Documentation

◆ $logger

ilLogger ilImportDirectoryFactory::$logger
protected

Definition at line 13 of file class.ilImportDirectoryFactory.php.

◆ $storage_directory

Filesystem ilImportDirectoryFactory::$storage_directory
protected

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

◆ TYPE_EXPORT

const ilImportDirectoryFactory::TYPE_EXPORT = 'export'

◆ TYPE_MOB

◆ TYPE_SAHS

const ilImportDirectoryFactory::TYPE_SAHS = 'sahs'

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