ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolutionFile Class Reference

a suggested solution for file-contents More...

+ Inheritance diagram for ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolutionFile:
+ Collaboration diagram for ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolutionFile:

Public Member Functions

 __construct (int $id, int $question_id, int $subquestion_index, string $import_id, \DateTimeImmutable $last_update, string $type, string $value)
 
 getType ()
 
 getStorableValue ()
 
 getTitle ()
 
 withTitle (string $title)
 
 getMime ()
 
 withMime (string $mime)
 
 getSize ()
 
 withSize (int $size)
 
 getFilename ()
 
 withFilename (string $filename)
 
- Public Member Functions inherited from ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution
 __construct (int $id, int $question_id, int $subquestion_index, string $import_id, \DateTimeImmutable $last_update)
 
 getType ()
 
 getStorableValue ()
 
 getId ()
 
 withId (int $id)
 
 getQuestionId ()
 
 withQuestionId (int $question_id)
 
 getImportId ()
 
 withImportId (string $import_id)
 
 getSubquestionIndex ()
 
 withSubquestionIndex (int $subquestion_index)
 
 getLastUpdate ()
 
 isOfTypeFile ()
 
 isOfTypeLink ()
 

Data Fields

const ARRAY_KEY_FILENAME = 'name'
 
const ARRAY_KEY_TITLE = 'filename'
 
const ARRAY_KEY_MIME = 'type'
 
const ARRAY_KEY_SIZE = 'size'
 
- Data Fields inherited from ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution
const TYPE_LM = 'lm'
 
const TYPE_LM_CHAPTER = 'st'
 
const TYPE_LM_PAGE = 'pg'
 
const TYPE_GLOSARY_TERM = 'git'
 
const TYPE_FILE = 'file'
 
const TYPES
 

Protected Attributes

string $filename
 
string $mime
 
int $size = 0
 
string $title
 
- Protected Attributes inherited from ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution
int $id
 
int $question_id
 
int $subquestion_index
 
string $import_id
 
DateTimeImmutable $last_update
 

Detailed Description

a suggested solution for file-contents

Author
Nils Haagen nils..nosp@m.haag.nosp@m.en@co.nosp@m.ncep.nosp@m.ts-an.nosp@m.d-tr.nosp@m.ainin.nosp@m.g.de

Definition at line 28 of file SuggestedSolutionFile.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolutionFile::__construct ( int  $id,
int  $question_id,
int  $subquestion_index,
string  $import_id,
\DateTimeImmutable  $last_update,
string  $type,
string  $value 
)

Definition at line 40 of file SuggestedSolutionFile.php.

References ILIAS\GlobalScreen\Provider\__construct().

48  {
50  $v = unserialize($value, []);
51 
52  $this->title = $v[self::ARRAY_KEY_TITLE] ?? '';
53  $this->filename = $v[self::ARRAY_KEY_FILENAME] ?? '';
54  $this->size = $v[self::ARRAY_KEY_SIZE] ?? 0;
55  $this->mime = $v[self::ARRAY_KEY_MIME] ?? '';
56  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ getFilename()

ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolutionFile::getFilename ( )

◆ getMime()

ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolutionFile::getMime ( )

◆ getSize()

ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolutionFile::getSize ( )

◆ getStorableValue()

◆ getTitle()

◆ getType()

ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolutionFile::getType ( )

Definition at line 58 of file SuggestedSolutionFile.php.

58  : string
59  {
60  return parent::TYPE_FILE;
61  }

◆ withFilename()

ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolutionFile::withFilename ( string  $filename)

Definition at line 113 of file SuggestedSolutionFile.php.

References ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolutionFile\$filename.

113  : static
114  {
115  $clone = clone $this;
116  $clone->filename = $filename;
117  return $clone;
118  }

◆ withMime()

ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolutionFile::withMime ( string  $mime)

Definition at line 91 of file SuggestedSolutionFile.php.

References ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolutionFile\$mime.

91  : static
92  {
93  $clone = clone $this;
94  $clone->mime = $mime;
95  return $clone;
96  }

◆ withSize()

ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolutionFile::withSize ( int  $size)

Definition at line 102 of file SuggestedSolutionFile.php.

References ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolutionFile\$size.

102  : static
103  {
104  $clone = clone $this;
105  $clone->size = $size;
106  return $clone;
107  }

◆ withTitle()

ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolutionFile::withTitle ( string  $title)

Definition at line 80 of file SuggestedSolutionFile.php.

References ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolutionFile\$title.

Referenced by SuggestedSolutionTest\testSuggestedSolutionMutatorsFile().

80  : static
81  {
82  $clone = clone $this;
83  $clone->title = $title;
84  return $clone;
85  }
+ Here is the caller graph for this function:

Field Documentation

◆ $filename

◆ $mime

string ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolutionFile::$mime
protected

◆ $size

int ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolutionFile::$size = 0
protected

◆ $title

string ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolutionFile::$title
protected

◆ ARRAY_KEY_FILENAME

const ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolutionFile::ARRAY_KEY_FILENAME = 'name'

Definition at line 30 of file SuggestedSolutionFile.php.

◆ ARRAY_KEY_MIME

const ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolutionFile::ARRAY_KEY_MIME = 'type'

Definition at line 32 of file SuggestedSolutionFile.php.

◆ ARRAY_KEY_SIZE

const ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolutionFile::ARRAY_KEY_SIZE = 'size'

Definition at line 33 of file SuggestedSolutionFile.php.

◆ ARRAY_KEY_TITLE

const ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolutionFile::ARRAY_KEY_TITLE = 'filename'

Definition at line 31 of file SuggestedSolutionFile.php.


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