◆ __construct()
ilTestExportFilename::__construct |
( |
ilObjTest |
$test | ) |
|
◆ getPathname()
ilTestExportFilename::getPathname |
( |
|
$extension, |
|
|
|
$additional = '' |
|
) |
| |
- Parameters
-
string | $extension | |
string | $additional | |
- Returns
- string
- Exceptions
-
Definition at line 46 of file class.ilTestExportFilename.php.
References $additional, and getTimestamp().
48 if (!is_string($extension) || !strlen($extension)) {
49 throw new ilException(
'Missing file extension! Please pass a file extension of type string.');
50 } elseif (substr_count($extension,
'.') > 1 || (strpos($extension,
'.') !==
false && strpos($extension,
'.') !== 0)) {
51 throw new ilException(
'Please use at most one dot in your file extension.');
52 } elseif (strpos($extension,
'.') === 0) {
53 $extension = substr($extension, 1);
59 throw new ilException(
'The additional file part may not contain __ at the beginning!');
67 return $this->test->getExportDirectory() . DIRECTORY_SEPARATOR . $this->
getTimestamp() .
'__' . IL_INST_ID .
'__' . $this->test->getType() .
$additional . $this->test->getId() .
'.' . $extension;
◆ getTimestamp()
ilTestExportFilename::getTimestamp |
( |
| ) |
|
◆ $test
ilTestExportFilename::$test |
|
protected |
◆ $timestamp
ilTestExportFilename::$timestamp = 0 |
|
protected |
The documentation for this class was generated from the following file: