Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
filecontroller.php
1
<?php
2
3
namespace
Bitrix\Main\Web\WebPacker
;
4
5
use
Bitrix\Main\ArgumentException
;
6
12
class
FileController
extends
Builder
13
{
15
private
$file;
16
18
private
$loader;
19
25
public
function
delete
()
26
{
27
$this->
getOutputFile
()->remove();
28
}
29
39
public
function
configureFile
($id, $moduleId, $dir, $name)
40
{
41
$this->
getOutputFile
()->setId($id)->setModuleId($moduleId)->setDir($dir)->setName($name);
42
return
$this;
43
}
44
48
public
function
getLoader
()
49
{
50
if
(!$this->loader)
51
{
52
$this->loader =
new
Loader
($this->
getOutputFile
());
53
}
54
55
return
$this->loader;
56
}
57
63
protected
function
getOutputFile
()
64
{
65
if
(!$this->file)
66
{
67
$this->file =
new
Output\File
();
68
}
69
70
$this->
setOutput
($this->file);
71
72
return
$this->file;
73
}
74
81
public
function
setOutput
(Output\Base
$output
)
82
{
83
if
(!
$output
instanceof Output\
File
)
84
{
85
throw
new
ArgumentException
(
'Output File expected.'
);
86
}
87
88
parent::setOutput(
$output
);
89
return
$this;
90
}
91
97
public
function
getOutput
()
98
{
99
if
(!$this->output)
100
{
101
$this->output =
new
Output\File
();
102
}
103
104
return
$this->output
;
105
}
106
}
Bitrix\Main\ArgumentException
Definition
exception.php:34
Bitrix\Main\IO\File
Definition
file.php:7
Bitrix\Main\Loader
Definition
loader.php:12
Bitrix\Main\Web\WebPacker\Builder
Definition
builder.php:16
Bitrix\Main\Web\WebPacker\Builder\$output
$output
Definition
builder.php:18
Bitrix\Main\Web\WebPacker\FileController
Definition
filecontroller.php:13
Bitrix\Main\Web\WebPacker\FileController\configureFile
configureFile($id, $moduleId, $dir, $name)
Definition
filecontroller.php:39
Bitrix\Main\Web\WebPacker\FileController\getOutputFile
getOutputFile()
Definition
filecontroller.php:63
Bitrix\Main\Web\WebPacker\FileController\getLoader
getLoader()
Definition
filecontroller.php:48
Bitrix\Main\Web\WebPacker\FileController\setOutput
setOutput(Output\Base $output)
Definition
filecontroller.php:81
Bitrix\Main\Web\WebPacker\FileController\getOutput
getOutput()
Definition
filecontroller.php:97
Bitrix\Main\Web\WebPacker
Definition
builder.php:3
modules
main
lib
web
webpacker
filecontroller.php
Создано системой
1.10.0