ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjFileInfo Class Reference
+ Collaboration diagram for ilObjFileInfo:

Public Member Functions

 __construct (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)
 
 getFileName ()
 
 getListTitle ()
 
 getHeaderTitle ()
 
 getSuffix ()
 
 shouldDeliverInline ()
 
 shouldDownloadDirectly ()
 
 getVersion ()
 
 getCreationDate ()
 
 isZip ()
 
 getMimeType ()
 
 getFileSize ()
 
 getPageCount ()
 

Protected Attributes

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
 

Private Attributes

string $title
 

Detailed Description

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

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

Constructor & Destructor Documentation

◆ __construct()

ilObjFileInfo::__construct ( 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 
)

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

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

59  {
60  $this->title = $title;
61  $this->file_name = $file_name;
62  $this->suffix = $suffix;
63  $this->deliver_inline = $deliver_inline;
64  $this->download_directly = $download_directly;
65  $this->version = $version;
66  $this->creation_date = $creation_date;
67  $this->is_zip = $is_zip;
68  $this->mime_type = $mime_type;
69  $this->file_size = $file_size;
70  $this->page_count = $page_count;
71  }
DateTimeImmutable $creation_date

Member Function Documentation

◆ getCreationDate()

ilObjFileInfo::getCreationDate ( )

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

References $creation_date.

109  {
110  return $this->creation_date;
111  }
DateTimeImmutable $creation_date

◆ getFileName()

ilObjFileInfo::getFileName ( )

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

References $file_name.

73  : string
74  {
75  return $this->file_name;
76  }

◆ getFileSize()

ilObjFileInfo::getFileSize ( )

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

References $file_size.

123  : DataSize
124  {
125  return $this->file_size;
126  }
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 83 of file class.ilObjFileInfo.php.

References ensureSuffix(), and getSuffix().

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

◆ getListTitle()

ilObjFileInfo::getListTitle ( )

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

References getSuffix(), and stripSuffix().

78  : string
79  {
80  return $this->stripSuffix($this->title, $this->getSuffix());
81  }
stripSuffix(string $title, ?string $suffix=null)
+ Here is the call graph for this function:

◆ getMimeType()

ilObjFileInfo::getMimeType ( )

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

References $mime_type.

118  : string
119  {
120  return $this->mime_type;
121  }

◆ getPageCount()

ilObjFileInfo::getPageCount ( )

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

References $page_count.

128  : ?int
129  {
130  return $this->page_count;
131  }

◆ getSuffix()

ilObjFileInfo::getSuffix ( )

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

References $suffix.

Referenced by getHeaderTitle(), and getListTitle().

88  : string
89  {
90  return $this->suffix;
91  }
+ Here is the caller graph for this function:

◆ getVersion()

ilObjFileInfo::getVersion ( )

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

References $version.

103  : int
104  {
105  return $this->version;
106  }

◆ isZip()

ilObjFileInfo::isZip ( )

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

References $is_zip.

113  : bool
114  {
115  return $this->is_zip;
116  }

◆ shouldDeliverInline()

ilObjFileInfo::shouldDeliverInline ( )

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

References $deliver_inline.

93  : bool
94  {
95  return $this->deliver_inline;
96  }

◆ shouldDownloadDirectly()

ilObjFileInfo::shouldDownloadDirectly ( )

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

References $download_directly.

98  : bool
99  {
101  }

Field Documentation

◆ $creation_date

DateTimeImmutable ilObjFileInfo::$creation_date
protected

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

Referenced by __construct(), and getCreationDate().

◆ $deliver_inline

bool ilObjFileInfo::$deliver_inline
protected

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

Referenced by __construct(), and shouldDeliverInline().

◆ $download_directly

bool ilObjFileInfo::$download_directly
protected

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

Referenced by __construct(), and shouldDownloadDirectly().

◆ $file_name

string ilObjFileInfo::$file_name
protected

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

Referenced by __construct(), and getFileName().

◆ $file_size

DataSize ilObjFileInfo::$file_size
protected

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

Referenced by __construct(), and getFileSize().

◆ $is_zip

bool ilObjFileInfo::$is_zip
protected

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

Referenced by __construct(), and isZip().

◆ $mime_type

string ilObjFileInfo::$mime_type
protected

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

Referenced by __construct(), and getMimeType().

◆ $page_count

int ilObjFileInfo::$page_count
protected

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

Referenced by __construct(), and getPageCount().

◆ $suffix

string ilObjFileInfo::$suffix
protected

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

Referenced by __construct(), and getSuffix().

◆ $title

string ilObjFileInfo::$title
private

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

Referenced by __construct().

◆ $version

int ilObjFileInfo::$version
protected

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

Referenced by __construct(), and getVersion().


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