1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
FileData.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\UI\FileUploader;
4
5
class
FileData
6
{
7
protected
string
$name
;
8
protected
string
$contentType
=
''
;
9
protected
int
$size
= 0;
10
protected
int
$width
= 0;
11
protected
int
$height
= 0;
12
13
public
function
__construct
(
string
$name
,
string
$contentType
,
int
$size
)
14
{
15
$this->name =
$name
;
16
$this->contentType =
$contentType
;
17
$this->
size
=
$size
;
18
}
19
20
public
function
getName
(): string
21
{
22
return
$this->name
;
23
}
24
25
public
function
setName
(
string
$name
): void
26
{
27
$this->name =
$name
;
28
}
29
30
public
function
getContentType
(): string
31
{
32
return
$this->contentType
;
33
}
34
35
public
function
getSize
(): int
36
{
37
return
$this->size
;
38
}
39
40
public
function
getWidth
(): int
41
{
42
return
$this->width
;
43
}
44
45
public
function
setWidth
(
int
$width
): void
46
{
47
if
(
$width
> 0)
48
{
49
$this->
width
=
$width
;
50
}
51
}
52
53
public
function
getHeight
(): int
54
{
55
return
$this->height
;
56
}
57
58
public
function
setHeight
(
int
$height
): void
59
{
60
if
(
$height
> 0)
61
{
62
$this->
height
=
$height
;
63
}
64
}
65
66
public
function
isImage
(): bool
67
{
68
return \CFile::isImage($this->
getName
()) && $this->
getWidth
() > 0 && $this->
getHeight
() > 0;
69
}
70
71
public
function
isVideo
(): bool
72
{
73
$extension = strtolower(getFileExtension($this->
getName
()));
74
75
return
in_array($extension,
Configuration::getVideoExtensions
(withDot:
false
));
76
}
77
}
Bitrix\UI\FileUploader\Configuration\getVideoExtensions
static getVideoExtensions(bool $withDot=true)
Определения
Configuration.php:237
Bitrix\UI\FileUploader\FileData
Определения
FileData.php:6
Bitrix\UI\FileUploader\FileData\$contentType
string $contentType
Определения
FileData.php:8
Bitrix\UI\FileUploader\FileData\isImage
isImage()
Определения
FileData.php:66
Bitrix\UI\FileUploader\FileData\setName
setName(string $name)
Определения
FileData.php:25
Bitrix\UI\FileUploader\FileData\setWidth
setWidth(int $width)
Определения
FileData.php:45
Bitrix\UI\FileUploader\FileData\$width
int $width
Определения
FileData.php:10
Bitrix\UI\FileUploader\FileData\getName
getName()
Определения
FileData.php:20
Bitrix\UI\FileUploader\FileData\$size
int $size
Определения
FileData.php:9
Bitrix\UI\FileUploader\FileData\$name
string $name
Определения
FileData.php:7
Bitrix\UI\FileUploader\FileData\getSize
getSize()
Определения
FileData.php:35
Bitrix\UI\FileUploader\FileData\__construct
__construct(string $name, string $contentType, int $size)
Определения
FileData.php:13
Bitrix\UI\FileUploader\FileData\$height
int $height
Определения
FileData.php:11
Bitrix\UI\FileUploader\FileData\setHeight
setHeight(int $height)
Определения
FileData.php:58
Bitrix\UI\FileUploader\FileData\isVideo
isVideo()
Определения
FileData.php:71
Bitrix\UI\FileUploader\FileData\getHeight
getHeight()
Определения
FileData.php:53
Bitrix\UI\FileUploader\FileData\getContentType
getContentType()
Определения
FileData.php:30
Bitrix\UI\FileUploader\FileData\getWidth
getWidth()
Определения
FileData.php:40
height
hidden PROPERTY[<?=$propertyIndex?>][CODE]<?=htmlspecialcharsEx( $propertyCode)?> height
Определения
file_new.php:759
width
bx popup label bx width30 PAGE_NEW_MENU_NAME text width
Определения
file_new.php:677
size
font size
Определения
invoice.php:442
bitrix
modules
ui
lib
FileUploader
FileData.php
Создано системой
1.14.0