ILIAS  release_7 Revision v7.30-3-g800a261c036
ilImportDirectory Class Reference
+ Inheritance diagram for ilImportDirectory:
+ Collaboration diagram for ilImportDirectory:

Public Member Functions

 __construct (Filesystem $storage, ilLogger $logger)
 
 getRelativePath ()
 
 exists ()
 
 getAbsolutePath ()
 

Protected Member Functions

 getPathPrefix ()
 

Protected Attributes

 $storage
 
 $logger
 

Private Member Functions

 init ()
 

Private Attributes

const PATH_UPLOAD_PREFIX = 'upload'
 
 $relative_path
 

Detailed Description

Definition at line 6 of file class.ilImportDirectory.php.

Constructor & Destructor Documentation

◆ __construct()

ilImportDirectory::__construct ( Filesystem  $storage,
ilLogger  $logger 
)

Definition at line 28 of file class.ilImportDirectory.php.

References $logger, $storage, and init().

29  {
30  $this->storage = $storage;
31  $this->logger = $logger;
32  $this->init();
33  }
+ Here is the call graph for this function:

Member Function Documentation

◆ exists()

ilImportDirectory::exists ( )
Returns
bool

Implements ilImportDirectoryHandler.

Definition at line 43 of file class.ilImportDirectory.php.

Referenced by getAbsolutePath(), and ilExportImportDirectory\getFilesFor().

43  : bool
44  {
45  return $this->storage->hasDir($this->relative_path);
46  }
+ Here is the caller graph for this function:

◆ getAbsolutePath()

ilImportDirectory::getAbsolutePath ( )
Returns
string

Implements ilImportDirectoryHandler.

Definition at line 51 of file class.ilImportDirectory.php.

References $relative_path, exists(), ilUtil\getDataDir(), and getPathPrefix().

51  : string
52  {
53  if (!$this->exists()) {
54  return '';
55  }
57  }
static getDataDir()
get data directory (outside webspace)
+ Here is the call graph for this function:

◆ getPathPrefix()

ilImportDirectory::getPathPrefix ( )
abstractprotected

Referenced by getAbsolutePath(), and init().

+ Here is the caller graph for this function:

◆ getRelativePath()

ilImportDirectory::getRelativePath ( )

Definition at line 35 of file class.ilImportDirectory.php.

References $relative_path.

Referenced by ilExportImportDirectory\getFilesFor().

35  : string
36  {
37  return $this->relative_path;
38  }
+ Here is the caller graph for this function:

◆ init()

ilImportDirectory::init ( )
private

Definition at line 62 of file class.ilImportDirectory.php.

References getPathPrefix().

Referenced by __construct().

63  {
64  $this->relative_path = self::PATH_UPLOAD_PREFIX . '/' . $this->getPathPrefix();
65  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $logger

ilImportDirectory::$logger
protected

Definition at line 26 of file class.ilImportDirectory.php.

Referenced by __construct().

◆ $relative_path

ilImportDirectory::$relative_path
private

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

Referenced by getAbsolutePath(), and getRelativePath().

◆ $storage

ilImportDirectory::$storage
protected

Definition at line 21 of file class.ilImportDirectory.php.

Referenced by __construct().

◆ PATH_UPLOAD_PREFIX

const ilImportDirectory::PATH_UPLOAD_PREFIX = 'upload'
private

Definition at line 11 of file class.ilImportDirectory.php.


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