1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
base.php
См. документацию.
1<?php
2
4
9
10class Base extends ProviderBase
11{
17 public function __construct(array $setting)
18 {
19 parent::__construct($setting);
20 }
21
25 public function addContent(string $code, $content, $type = false): bool
26 {
27 throw new SystemException(
28 'This method isn\'t supported',
29 'ERROR_METHOD'
30 );
31 }
32
41 public function get(string $path, int $step): ?array
42 {
43 $result = null;
44 if ($path)
45 {
46 $fileInfo = \CFile::MakeFileArray($path);
47 if (is_array($fileInfo) && $fileInfo['tmp_name'] && File::isFileExists($fileInfo['tmp_name']))
48 {
49 preg_match( "/\/([a-zA-Z0-9_-]+)\.[a-zA-Z0-9_-]+$/", $path, $matches);
50 $name = $matches[1] ?? null;
51
52 $file = new File($fileInfo['tmp_name']);
53 try
54 {
55 $result = [
56 'DATA' => $file->getContents(),
57 'FILE_NAME' => $name,
58 ];
59 }
60 catch (FileNotFoundException $exception)
61 {
62 $result = null;
63 }
64 }
65 }
66
67 return $result;
68 }
69
75 public function addFiles(array $files): array
76 {
77 throw new SystemException(
78 'This method isn\'t supported',
79 'ERROR_METHOD'
80 );
81 }
82}
$path
Определения access_edit.php:21
$type
Определения options.php:106
addContent(string $code, $content, $type=false)
Определения base.php:25
__construct(array $setting)
Определения base.php:17
addFiles(array $files)
Определения base.php:75
$content
Определения commerceml.php:144
</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
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
Определения options.php:195
$name
Определения menu_edit.php:35
Определения Image.php:9
$files
Определения mysql_to_pgsql.php:30
$matches
Определения index.php:22