ILIAS
release_9 Revision v9.13-25-g2c18ec4c24f
◀ ilDoc Overview
class.ilAssQuestionProcessLockFileStorage.php
Go to the documentation of this file.
1
<?php
24
class
ilAssQuestionProcessLockFileStorage
extends
ilFileSystemAbstractionStorage
25
{
26
private
$subPath
;
27
28
public
function
__construct
(
int
$questionId, $userId)
29
{
30
parent::__construct
(
ilFileSystemAbstractionStorage::STORAGE_DATA
,
true
, $questionId);
31
32
$this->
initSubPath
($userId);
33
}
34
43
protected
function
getPathPrefix
(): string
44
{
45
return
'ilAssQuestionProcessLocks'
;
46
}
47
57
protected
function
getPathPostfix
(): string
58
{
59
return
'question'
;
60
}
61
62
public
function
getPath
(): string
63
{
64
return
parent::getPath() .
'/'
.
$this->subPath
;
65
}
66
67
public
function
create
(): void
68
{
69
set_error_handler(
function
($severity,
$message
, $file, $line):
void
{
70
throw
new
ErrorException
(
$message
, $severity, 0, $file, $line);
71
});
72
73
try
{
74
parent::create($this->
getPath
());
75
restore_error_handler();
76
}
catch
(
Exception
$e
) {
77
restore_error_handler();
78
}
79
80
if
(!$this->
getFileSystemService
()->
has
($this->path)) {
81
throw
new
ErrorException
(sprintf(
'Could not find directory: %s'
, $this->
getPath
()));
82
}
83
}
84
85
private
function
initSubPath
($userId): void
86
{
87
$userId = (string) $userId;
88
89
$path
= array();
90
91
for
($i = 0, $max = strlen($userId); $i < $max; $i++) {
92
$path
[] = substr($userId, $i, 1);
93
}
94
95
$this->subPath = implode(
'/'
,
$path
);
96
}
97
}
ilAssQuestionProcessLockFileStorage
Definition:
class.ilAssQuestionProcessLockFileStorage.php:24
ilAssQuestionProcessLockFileStorage\getPathPrefix
getPathPrefix()
Get path prefix.
Definition:
class.ilAssQuestionProcessLockFileStorage.php:43
ilFileSystemAbstractionStorage\getFileSystemService
getFileSystemService()
Definition:
class.ilFileSystemAbstractionStorage.php:74
Vendor\Package\$e
$e
Definition:
example_cleaned.php:49
ilAssQuestionProcessLockFileStorage\__construct
__construct(int $questionId, $userId)
Definition:
class.ilAssQuestionProcessLockFileStorage.php:28
ILIAS\GlobalScreen\has
has(string $class_name)
Definition:
SingletonTrait.php:61
ilAssQuestionProcessLockFileStorage\$subPath
$subPath
Definition:
class.ilAssQuestionProcessLockFileStorage.php:26
ILIAS\MetaData\Repository\Validation\Data\__construct
__construct(VocabulariesInterface $vocabularies)
Definition:
VocabularyBridge.php:31
ilAssQuestionProcessLockFileStorage\create
create()
Definition:
class.ilAssQuestionProcessLockFileStorage.php:67
ilAssQuestionProcessLockFileStorage\initSubPath
initSubPath($userId)
Definition:
class.ilAssQuestionProcessLockFileStorage.php:85
ErrorException
ilAssQuestionProcessLockFileStorage\getPath
getPath()
Definition:
class.ilAssQuestionProcessLockFileStorage.php:62
ilAssQuestionProcessLockFileStorage\getPathPostfix
getPathPostfix()
Get directory name.
Definition:
class.ilAssQuestionProcessLockFileStorage.php:57
ilFileSystemAbstractionStorage\STORAGE_DATA
const STORAGE_DATA
Definition:
class.ilFileSystemAbstractionStorage.php:29
$message
$message
Definition:
xapiexit.php:32
ilFileSystemAbstractionStorage
Definition:
class.ilFileSystemAbstractionStorage.php:26
ilFileSystemAbstractionStorage\$path
string $path
Definition:
class.ilFileSystemAbstractionStorage.php:37
Exception
Modules
TestQuestionPool
classes
class.ilAssQuestionProcessLockFileStorage.php
Generated on Wed Sep 10 2025 14:11:10 for ILIAS by
1.8.13 (using
Doxyfile
)