Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
file.php
1<?php
2
3namespace Bitrix\Bizproc;
4
5class File
6{
7 private array $file;
8
9 private function __construct(array $file)
10 {
11 $this->file = $file;
12 }
13
14 public function getFileArray(): array
15 {
16 return $this->file;
17 }
18
19 public static function openById(int $fileId): Result
20 {
21 $file = \CFile::MakeFileArray($fileId);
22 if(!is_array($file))
23 {
24 return Result::createFromErrorCode(Error::FILE_NOT_FOUND);
25 }
26
27 return Result::createOk(['file' => new static($file)]);
28 }
29}
static openById(int $fileId)
Definition file.php:19