ILIAS
trunk Revision v12.0_alpha-377-g3641b37b9db
◀ ilDoc Overview
class.ilImportDirectory.php
Go to the documentation of this file.
1
<?php
2
19
use
ILIAS\Filesystem\Filesystem
;
20
21
abstract
class
ilImportDirectory
implements
ilImportDirectoryHandler
22
{
23
private
const
PATH_UPLOAD_PREFIX
=
'upload'
;
24
private
string
$relative_path
;
25
26
protected
Filesystem
$storage
;
27
protected
ilLogger
$logger
;
28
29
public
function
__construct
(
Filesystem
$storage
,
ilLogger
$logger
)
30
{
31
$this->storage =
$storage
;
32
$this->
logger
=
$logger
;
33
$this->
init
();
34
}
35
36
public
function
getRelativePath
(): string
37
{
38
return
$this->relative_path
;
39
}
40
44
public
function
exists
(): bool
45
{
46
return
$this->storage->hasDir($this->relative_path);
47
}
48
52
public
function
getAbsolutePath
(): string
53
{
54
if
(!$this->
exists
()) {
55
return
''
;
56
}
57
return
ilFileUtils::getDataDir
() .
'/'
.
$this->relative_path
;
58
}
59
60
abstract
protected
function
getPathPrefix
(): string;
61
62
private
function
init
(): void
63
{
64
$this->relative_path = self::PATH_UPLOAD_PREFIX .
'/'
. $this->
getPathPrefix
();
65
}
66
}
ilFileUtils\getDataDir
static getDataDir()
get data directory (outside webspace)
Definition:
class.ilFileUtils.php:250
ilImportDirectory
Definition:
class.ilImportDirectory.php:22
ilImportDirectory\__construct
__construct(Filesystem $storage, ilLogger $logger)
Definition:
class.ilImportDirectory.php:29
ilImportDirectory\getRelativePath
getRelativePath()
Definition:
class.ilImportDirectory.php:36
ilImportDirectory\getAbsolutePath
getAbsolutePath()
@inheritDoc
Definition:
class.ilImportDirectory.php:52
ilImportDirectory\$logger
ilLogger $logger
Definition:
class.ilImportDirectory.php:27
ilImportDirectory\getPathPrefix
getPathPrefix()
ilImportDirectory\$storage
Filesystem $storage
Definition:
class.ilImportDirectory.php:26
ilImportDirectory\$relative_path
string $relative_path
Definition:
class.ilImportDirectory.php:24
ilImportDirectory\PATH_UPLOAD_PREFIX
const PATH_UPLOAD_PREFIX
Definition:
class.ilImportDirectory.php:23
ilImportDirectory\exists
exists()
@inheritDoc
Definition:
class.ilImportDirectory.php:44
ilImportDirectory\init
init()
Definition:
class.ilImportDirectory.php:62
ilLogger
Component logger with individual log levels by component id.
Definition:
class.ilLogger.php:29
ILIAS\Filesystem\Filesystem
The filesystem interface provides the public interface for the Filesystem service API consumer.
Definition:
Filesystem.php:37
ilImportDirectoryHandler
Import directory interface.
Definition:
interface.ilImportDirectoryHandler.php:27
ILIAS\Repository\logger
logger()
Definition:
trait.GlobalDICDomainServices.php:71
components
ILIAS
Export
classes
ImportDirectory
class.ilImportDirectory.php
Generated on Sat Dec 13 2025 23:02:18 for ILIAS by
1.9.4 (using
Doxyfile
)