ILIAS
trunk Revision v11.0_alpha-2638-g80c1d007f79
◀ ilDoc Overview
class.Image.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\Style\Content
;
22
23
use
ILIAS\Data\DataSize
;
24
29
class
Image
30
{
31
protected
string
$path
;
32
protected
string
$type
;
33
protected
DataSize
$size
;
34
protected
int
$width
;
35
protected
int
$height
;
36
37
public
function
__construct
(
38
string
$path,
39
DataSize
$size,
40
int
$width,
41
int
$height
42
) {
43
$this->path =
$path
;
44
$this->width =
$width
;
45
$this->height =
$height
;
46
$this->size =
$size
;
47
}
48
49
public
function
getPath
(): string
50
{
51
return
$this->path
;
52
}
53
54
public
function
getFilename
(): string
55
{
56
return
basename($this->path);
57
}
58
59
public
function
getType
(): string
60
{
61
return
pathinfo($this->path, PATHINFO_EXTENSION);
62
}
63
64
public
function
getSize
():
DataSize
65
{
66
return
$this->size
;
67
}
68
69
public
function
getWidth
():
int
70
{
71
return
$this->width
;
72
}
73
74
public
function
getHeight
():
int
75
{
76
return
$this->height
;
77
}
78
}
ILIAS\Style\Content\Image\__construct
__construct(string $path, DataSize $size, int $width, int $height)
Definition:
class.Image.php:37
Image
ILIAS\Style\Content
ILIAS\Style\Content\Image\$size
DataSize $size
Definition:
class.Image.php:33
DataSize
ILIAS\Style\Content\Image\$height
int $height
Definition:
class.Image.php:35
ILIAS\Data\DataSize
This class provides the data size with additional information to remove the work to calculate the siz...
Definition:
DataSize.php:30
ILIAS\Style\Content\Image\getType
getType()
Definition:
class.Image.php:59
ILIAS\Style\Content\Image\getFilename
getFilename()
Definition:
class.Image.php:54
ILIAS\Style\Content\Image\getPath
getPath()
Definition:
class.Image.php:49
ILIAS\Style\Content\Image\getWidth
getWidth()
Definition:
class.Image.php:69
ILIAS\Style\Content\Image\$width
int $width
Definition:
class.Image.php:34
ILIAS\Style\Content\Image\$path
string $path
Definition:
class.Image.php:31
ILIAS\Style\Content\Image\getSize
getSize()
Definition:
class.Image.php:64
ILIAS\Style\Content\Image\$type
string $type
Definition:
class.Image.php:32
ILIAS\Repository\int
int(string $key)
Definition:
trait.BaseGUIRequest.php:61
ILIAS\Style\Content\Image\getHeight
getHeight()
Definition:
class.Image.php:74
components
ILIAS
Style
Content
Images
class.Image.php
Generated on Sun Aug 31 2025 23:03:50 for ILIAS by
1.8.13 (using
Doxyfile
)