ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.ilObjFileInfo.php
Go to the documentation of this file.
1 <?php
2 
21 
26 {
28 
29  public function __construct(protected string $title, protected ?ResourceIdentification $rid, protected string $file_name, protected string $suffix, protected bool $deliver_inline, protected bool $download_directly, protected int $version, protected DateTimeImmutable $creation_date, protected bool $is_zip, protected string $mime_type, protected DataSize $file_size, protected ?int $page_count)
30  {
31  }
32 
33  public function getFileName(): string
34  {
35  return $this->file_name;
36  }
37 
38  public function getListTitle(): string
39  {
40  return $this->stripSuffix($this->title, $this->getSuffix());
41  }
42 
43  public function getHeaderTitle(): string
44  {
45  return $this->stripSuffix($this->title, $this->getSuffix());
46  }
47 
48  public function getSuffix(): string
49  {
50  return $this->suffix;
51  }
52 
53  public function getRID(): ?ResourceIdentification
54  {
55  return $this->rid;
56  }
57 
58  public function shouldDeliverInline(): bool
59  {
60  return $this->deliver_inline;
61  }
62 
63  public function shouldDownloadDirectly(): bool
64  {
65  return $this->download_directly;
66  }
67 
68  public function getVersion(): int
69  {
70  return $this->version;
71  }
72 
74  {
75  return $this->creation_date;
76  }
77 
78  public function isZip(): bool
79  {
80  return $this->is_zip;
81  }
82 
83  public function getMimeType(): string
84  {
85  return $this->mime_type;
86  }
87 
88  public function getFileSize(): DataSize
89  {
90  return $this->file_size;
91  }
92 
93  public function getPageCount(): ?int
94  {
95  return $this->page_count;
96  }
97 
98 }
$version
Definition: plugin.php:24
This class provides the data size with additional information to remove the work to calculate the siz...
Definition: DataSize.php:30
__construct(protected string $title, protected ?ResourceIdentification $rid, protected string $file_name, protected string $suffix, protected bool $deliver_inline, protected bool $download_directly, protected int $version, protected DateTimeImmutable $creation_date, protected bool $is_zip, protected string $mime_type, protected DataSize $file_size, protected ?int $page_count)
stripSuffix(string $title, ?string $suffix=null)
trait ilObjFileSecureString
Trait ilObjFileSecureString.