ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilObjFileInfo Class Reference
+ Collaboration diagram for ilObjFileInfo:

Public Member Functions

 __construct (string $title, ?ResourceIdentification $rid, string $file_name, string $suffix, bool $deliver_inline, bool $download_directly, int $version, DateTimeImmutable $creation_date, bool $is_zip, string $mime_type, DataSize $file_size, ?int $page_count)
 
 getFileName ()
 
 getListTitle ()
 
 getHeaderTitle ()
 
 getSuffix ()
 
 getRID ()
 
 shouldDeliverInline ()
 
 shouldDownloadDirectly ()
 
 getVersion ()
 
 getCreationDate ()
 
 isZip ()
 
 getMimeType ()
 
 getFileSize ()
 
 getPageCount ()
 

Protected Attributes

ResourceIdentification $rid
 
string $title
 
string $file_name
 
string $suffix
 
bool $deliver_inline
 
bool $download_directly
 
int $version
 
DateTimeImmutable $creation_date
 
bool $is_zip
 
string $mime_type
 
DataSize $file_size
 
int $page_count
 

Detailed Description

Author
Fabian Schmid fabia.nosp@m.n@sr.nosp@m..solu.nosp@m.tion.nosp@m.s

Definition at line 32 of file class.ilObjFileInfo.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjFileInfo::__construct ( string  $title,
?ResourceIdentification  $rid,
string  $file_name,
string  $suffix,
bool  $deliver_inline,
bool  $download_directly,
int  $version,
DateTimeImmutable  $creation_date,
bool  $is_zip,
string  $mime_type,
DataSize  $file_size,
?int  $page_count 
)

Definition at line 49 of file class.ilObjFileInfo.php.

References $creation_date, $deliver_inline, $download_directly, $file_name, $file_size, $is_zip, $mime_type, $page_count, $rid, $suffix, $title, and $version.

62  {
63  $this->title = $title;
64  $this->rid = $rid;
65  $this->file_name = $file_name;
66  $this->suffix = $suffix;
67  $this->deliver_inline = $deliver_inline;
68  $this->download_directly = $download_directly;
69  $this->version = $version;
70  $this->creation_date = $creation_date;
71  $this->is_zip = $is_zip;
72  $this->mime_type = $mime_type;
73  $this->file_size = $file_size;
74  $this->page_count = $page_count;
75  }
DateTimeImmutable $creation_date
ResourceIdentification $rid

Member Function Documentation

◆ getCreationDate()

ilObjFileInfo::getCreationDate ( )

Definition at line 117 of file class.ilObjFileInfo.php.

References $creation_date.

118  {
119  return $this->creation_date;
120  }
DateTimeImmutable $creation_date

◆ getFileName()

ilObjFileInfo::getFileName ( )

Definition at line 77 of file class.ilObjFileInfo.php.

References $file_name.

77  : string
78  {
79  return $this->file_name;
80  }

◆ getFileSize()

ilObjFileInfo::getFileSize ( )

Definition at line 132 of file class.ilObjFileInfo.php.

References $file_size.

132  : DataSize
133  {
134  return $this->file_size;
135  }
This class provides the data size with additional information to remove the work to calculate the siz...
Definition: DataSize.php:30

◆ getHeaderTitle()

ilObjFileInfo::getHeaderTitle ( )

Definition at line 87 of file class.ilObjFileInfo.php.

References getSuffix(), and stripSuffix().

87  : string
88  {
89  return $this->stripSuffix($this->title, $this->getSuffix());
90  }
stripSuffix(string $title, ?string $suffix=null)
+ Here is the call graph for this function:

◆ getListTitle()

ilObjFileInfo::getListTitle ( )

Definition at line 82 of file class.ilObjFileInfo.php.

References getSuffix(), and stripSuffix().

82  : string
83  {
84  return $this->stripSuffix($this->title, $this->getSuffix());
85  }
stripSuffix(string $title, ?string $suffix=null)
+ Here is the call graph for this function:

◆ getMimeType()

ilObjFileInfo::getMimeType ( )

Definition at line 127 of file class.ilObjFileInfo.php.

References $mime_type.

127  : string
128  {
129  return $this->mime_type;
130  }

◆ getPageCount()

ilObjFileInfo::getPageCount ( )

Definition at line 137 of file class.ilObjFileInfo.php.

References $page_count.

137  : ?int
138  {
139  return $this->page_count;
140  }

◆ getRID()

ilObjFileInfo::getRID ( )

Definition at line 97 of file class.ilObjFileInfo.php.

References $rid.

98  {
99  return $this->rid;
100  }
ResourceIdentification $rid

◆ getSuffix()

ilObjFileInfo::getSuffix ( )

Definition at line 92 of file class.ilObjFileInfo.php.

References $suffix.

Referenced by getHeaderTitle(), getListTitle(), ILIAS\File\Capabilities\Check\EditContent\maybeUnlock(), and ILIAS\File\Capabilities\Check\ViewContent\maybeUnlock().

92  : string
93  {
94  return $this->suffix;
95  }
+ Here is the caller graph for this function:

◆ getVersion()

ilObjFileInfo::getVersion ( )

Definition at line 112 of file class.ilObjFileInfo.php.

References $version.

112  : int
113  {
114  return $this->version;
115  }

◆ isZip()

ilObjFileInfo::isZip ( )

Definition at line 122 of file class.ilObjFileInfo.php.

References $is_zip.

Referenced by ILIAS\File\Capabilities\Check\Unzip\maybeUnlock().

122  : bool
123  {
124  return $this->is_zip;
125  }
+ Here is the caller graph for this function:

◆ shouldDeliverInline()

ilObjFileInfo::shouldDeliverInline ( )

Definition at line 102 of file class.ilObjFileInfo.php.

References $deliver_inline.

102  : bool
103  {
104  return $this->deliver_inline;
105  }

◆ shouldDownloadDirectly()

ilObjFileInfo::shouldDownloadDirectly ( )

Definition at line 107 of file class.ilObjFileInfo.php.

References $download_directly.

Referenced by ILIAS\File\Capabilities\Check\ForcedInfo\maybeUnlock().

107  : bool
108  {
110  }
+ Here is the caller graph for this function:

Field Documentation

◆ $creation_date

DateTimeImmutable ilObjFileInfo::$creation_date
protected

Definition at line 43 of file class.ilObjFileInfo.php.

Referenced by __construct(), and getCreationDate().

◆ $deliver_inline

bool ilObjFileInfo::$deliver_inline
protected

Definition at line 40 of file class.ilObjFileInfo.php.

Referenced by __construct(), and shouldDeliverInline().

◆ $download_directly

bool ilObjFileInfo::$download_directly
protected

Definition at line 41 of file class.ilObjFileInfo.php.

Referenced by __construct(), and shouldDownloadDirectly().

◆ $file_name

string ilObjFileInfo::$file_name
protected

Definition at line 38 of file class.ilObjFileInfo.php.

Referenced by __construct(), and getFileName().

◆ $file_size

DataSize ilObjFileInfo::$file_size
protected

Definition at line 46 of file class.ilObjFileInfo.php.

Referenced by __construct(), and getFileSize().

◆ $is_zip

bool ilObjFileInfo::$is_zip
protected

Definition at line 44 of file class.ilObjFileInfo.php.

Referenced by __construct(), and isZip().

◆ $mime_type

string ilObjFileInfo::$mime_type
protected

Definition at line 45 of file class.ilObjFileInfo.php.

Referenced by __construct(), and getMimeType().

◆ $page_count

int ilObjFileInfo::$page_count
protected

Definition at line 47 of file class.ilObjFileInfo.php.

Referenced by __construct(), and getPageCount().

◆ $rid

ResourceIdentification ilObjFileInfo::$rid
protected

Definition at line 36 of file class.ilObjFileInfo.php.

Referenced by __construct(), and getRID().

◆ $suffix

string ilObjFileInfo::$suffix
protected

Definition at line 39 of file class.ilObjFileInfo.php.

Referenced by __construct(), and getSuffix().

◆ $title

string ilObjFileInfo::$title
protected

Definition at line 37 of file class.ilObjFileInfo.php.

Referenced by __construct().

◆ $version

int ilObjFileInfo::$version
protected

Definition at line 42 of file class.ilObjFileInfo.php.

Referenced by __construct(), and getVersion().


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