Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
FileError.php
1
<?php
2
3
namespace
Bitrix\Im\V2\Entity\File
;
4
5
use
Bitrix\Im\V2\Error
;
6
use
Bitrix\Main\Localization\Loc
;
7
8
class
FileError
extends
Error
9
{
10
public
const
UNKNOWN_FILE_SUBTYPE
=
'UNKNOWN_FILE_SUBTYPE'
;
11
public
const
NOT_FOUND
=
'FILE_NOT_FOUND'
;
12
public
const
CREATE_SYMLINK
=
'CREATE_SYMLINK_ERROR'
;
13
public
const
SAVE_BEFORE_MIGRATION_ERROR
=
'FILE_SAVE_BEFORE_MIGRATION_ERROR'
;
14
15
protected
function
loadErrorMessage
(
$code
, $replacements): string
16
{
17
$postfix =
''
;
18
19
if
(
$code
=== self::CREATE_SYMLINK)
20
{
21
$postfix =
'_V3'
;
22
}
23
24
return
Loc::getMessage
(
"ERROR_FILE_{$code}{$postfix}"
, $replacements) ?:
''
;
25
}
26
27
protected
function
loadErrorDescription
(
$code
, $replacements): string
28
{
29
return
Loc::getMessage
(
"ERROR_FILE_{$code}_DESC"
, $replacements) ?:
''
;
30
}
31
}
Bitrix\Im\V2\Entity\File\FileError
Definition
FileError.php:9
Bitrix\Im\V2\Entity\File\FileError\SAVE_BEFORE_MIGRATION_ERROR
const SAVE_BEFORE_MIGRATION_ERROR
Definition
FileError.php:13
Bitrix\Im\V2\Entity\File\FileError\CREATE_SYMLINK
const CREATE_SYMLINK
Definition
FileError.php:12
Bitrix\Im\V2\Entity\File\FileError\UNKNOWN_FILE_SUBTYPE
const UNKNOWN_FILE_SUBTYPE
Definition
FileError.php:10
Bitrix\Im\V2\Entity\File\FileError\NOT_FOUND
const NOT_FOUND
Definition
FileError.php:11
Bitrix\Im\V2\Entity\File\FileError\loadErrorMessage
loadErrorMessage($code, $replacements)
Definition
FileError.php:15
Bitrix\Im\V2\Entity\File\FileError\loadErrorDescription
loadErrorDescription($code, $replacements)
Definition
FileError.php:27
Bitrix\Im\V2\Error
Definition
Error.php:8
Bitrix\Main\Error\$code
$code
Definition
error.php:16
Bitrix\Main\Localization\Loc
Definition
loc.php:11
Bitrix\Main\Localization\Loc\getMessage
static getMessage($code, $replace=null, $language=null)
Definition
loc.php:29
Bitrix\Im\V2\Entity\File
Definition
FileCollection.php:3
modules
im
lib
V2
Entity
File
FileError.php
Создано системой
1.10.0