ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 23 of file class.ilImportDirectoryFactory.php.

Constructor & Destructor Documentation

◆ __construct()

ilImportDirectoryFactory::__construct ( )

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

33 {
34 global $DIC;
35
36 $this->logger = $DIC->logger()->exp();
37 $this->storage_directory = $DIC->filesystem()->storage();
38 }
global $DIC
Definition: shib_login.php:26

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 40 of file class.ilImportDirectoryFactory.php.

41 {
42 switch ($type) {
43 case self::TYPE_MOB:
44 $instance = new ilMediaObjectImportDirectory(
45 $this->storage_directory,
46 $this->logger
47 );
48 break;
49
50 case self::TYPE_SAHS:
51 $instance = new ilScormImportDirectory(
52 $this->storage_directory,
53 $this->logger
54 );
55 break;
56
58 $instance = new ilExportImportDirectory(
59 $this->storage_directory,
60 $this->logger
61 );
62 break;
63
64 default:
65 $this->logger->error('Invalid type given: ' . $type);
66 throw new DomainException(
67 'Invalid type given: ' . $type
68 );
69 }
70 return $instance;
71 }
Import directory interface.

References 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 29 of file class.ilImportDirectoryFactory.php.

◆ $storage_directory

Filesystem ilImportDirectoryFactory::$storage_directory
protected

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

◆ TYPE_EXPORT

const ilImportDirectoryFactory::TYPE_EXPORT = 'export'

◆ TYPE_MOB

const ilImportDirectoryFactory::TYPE_MOB = 'mob'

◆ TYPE_SAHS

const ilImportDirectoryFactory::TYPE_SAHS = 'sahs'

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