1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
base.php
См. документацию.
1<?php
2
4
10
11class Base extends ProviderBase
12{
18 public function __construct(array $setting)
19 {
20 parent::__construct($setting);
21 }
22
26 public function set()
27 {
28 throw new SystemException(
29 'This method isn\'t supported',
30 'ERROR_METHOD'
31 );
32 }
33
40 public function get($path): array
41 {
42 $result = null;
43 if ($path)
44 {
45 $fileInfo = \CFile::MakeFileArray($path);
46 if (is_array($fileInfo) && File::isFileExists($fileInfo['tmp_name']))
47 {
48 preg_match( "/\/([a-zA-Z0-9_-]+)\.[a-zA-Z0-9_-]+$/", $path, $matches);
49 $name = $matches[1] ?? null;
50
51 $file = new File($fileInfo['tmp_name']);
52 try
53 {
54 $result = [
55 'DATA' => $file->getContents(),
56 'FILE_NAME' => $name,
57 ];
58 }
59 catch (FileNotFoundException $exception)
60 {
61 $result = null;
62 }
63 }
64 }
65
66 return $result;
67 }
68
74 public function addFiles(array $files)
75 {
76 throw new SystemException(
77 'This method isn\'t supported',
78 'ERROR_METHOD'
79 );
80 }
81}
$path
Определения access_edit.php:21
__construct(array $setting)
Определения base.php:18
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$result
Определения get_property_values.php:14
$name
Определения menu_edit.php:35
Определения Image.php:9
$files
Определения mysql_to_pgsql.php:30
$matches
Определения index.php:22