ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\MetaData\OERExposer\OAIPMH\Handler\BasicFileInfoResult Class Reference

Class BasicFileInfoResult. More...

+ Inheritance diagram for ILIAS\MetaData\OERExposer\OAIPMH\Handler\BasicFileInfoResult:
+ Collaboration diagram for ILIAS\MetaData\OERExposer\OAIPMH\Handler\BasicFileInfoResult:

Public Member Functions

 __construct (private string $file_identification_key, private string $file_identifier, private string $name, private int $size, private string $mime_type)
 
 getFileIdentifier ()
 
 getName ()
 
 getSize ()
 
 getMimeType ()
 
 jsonSerialize ()
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ILIAS\MetaData\OERExposer\OAIPMH\Handler\BasicFileInfoResult::__construct ( private string  $file_identification_key,
private string  $file_identifier,
private string  $name,
private int  $size,
private string  $mime_type 
)
Parameters
int$sizein Bytes, we will change this to DataSize in the future

Definition at line 33 of file BasicFileInfoResult.php.

34  {
35  }

Member Function Documentation

◆ getFileIdentifier()

ILIAS\MetaData\OERExposer\OAIPMH\Handler\BasicFileInfoResult::getFileIdentifier ( )

Implements ILIAS\MetaData\OERExposer\OAIPMH\Handler\FileInfoResult.

Definition at line 38 of file BasicFileInfoResult.php.

38  : string
39  {
40  return $this->file_identifier;
41  }

◆ getMimeType()

ILIAS\MetaData\OERExposer\OAIPMH\Handler\BasicFileInfoResult::getMimeType ( )

Implements ILIAS\MetaData\OERExposer\OAIPMH\Handler\FileInfoResult.

Definition at line 56 of file BasicFileInfoResult.php.

56  : string
57  {
58  return $this->mime_type;
59  }

◆ getName()

ILIAS\MetaData\OERExposer\OAIPMH\Handler\BasicFileInfoResult::getName ( )

Implements ILIAS\MetaData\OERExposer\OAIPMH\Handler\FileInfoResult.

Definition at line 44 of file BasicFileInfoResult.php.

44  : string
45  {
46  return $this->name;
47  }

◆ getSize()

ILIAS\MetaData\OERExposer\OAIPMH\Handler\BasicFileInfoResult::getSize ( )
Returns
int in Bytes, we will change this to DataSize in the future

Implements ILIAS\MetaData\OERExposer\OAIPMH\Handler\FileInfoResult.

Definition at line 50 of file BasicFileInfoResult.php.

50  : int
51  {
52  return $this->size;
53  }

◆ jsonSerialize()

ILIAS\MetaData\OERExposer\OAIPMH\Handler\BasicFileInfoResult::jsonSerialize ( )
final

Definition at line 65 of file BasicFileInfoResult.php.

References ILIAS\UI\Component\Input\Field\UploadHandler\DEFAULT_FILE_ID_PARAMETER.

65  : array
66  {
67  $str = $this->file_identification_key ?? UploadHandler::DEFAULT_FILE_ID_PARAMETER;
68 
69  return [
70  'name' => $this->name,
71  'size' => $this->size,
72  'mime_type' => $this->mime_type,
73  $str => $this->file_identifier,
74  ];
75  }

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