1 | <?php |
||
13 | class banner |
||
14 | { |
||
15 | /** @var \phpbb\files\upload */ |
||
16 | protected $files_upload; |
||
17 | |||
18 | /** @var \phpbb\filesystem\filesystem_interface */ |
||
19 | protected $filesystem; |
||
20 | |||
21 | /** @var string */ |
||
22 | protected $root_path; |
||
23 | |||
24 | /** @var \phpbb\files\filespec */ |
||
25 | protected $file; |
||
26 | |||
27 | /** |
||
28 | * Constructor |
||
29 | * |
||
30 | * @param \phpbb\files\upload $files_upload Files upload object |
||
31 | * @param \phpbb\filesystem\filesystem_interface $filesystem Filesystem object |
||
32 | * @param string $root_path Root path |
||
33 | */ |
||
34 | 7 | public function __construct(\phpbb\files\upload $files_upload, \phpbb\filesystem\filesystem_interface $filesystem, $root_path) |
|
40 | |||
41 | 3 | public function set_file($file) |
|
45 | |||
46 | /** |
||
47 | * Create storage directory for banners uploaded by Ads Management |
||
48 | */ |
||
49 | 4 | public function create_storage_dir() |
|
56 | |||
57 | /** |
||
58 | * Handle banner upload |
||
59 | */ |
||
60 | 2 | public function upload() |
|
83 | |||
84 | /** |
||
85 | * Remove file from the filesystem |
||
86 | */ |
||
87 | 1 | public function remove() |
|
91 | } |
||
92 |