Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 15 |
|
0.00% |
0 / 6 |
CRAP | |
0.00% |
0 / 1 |
| local | |
0.00% |
0 / 15 |
|
0.00% |
0 / 6 |
42 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_name | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_title | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_adapter_class | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_options | |
0.00% |
0 / 10 |
|
0.00% |
0 / 1 |
2 | |||
| is_available | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | /** |
| 3 | * |
| 4 | * This file is part of the phpBB Forum Software package. |
| 5 | * |
| 6 | * @copyright (c) phpBB Limited <https://www.phpbb.com> |
| 7 | * @license GNU General Public License, version 2 (GPL-2.0) |
| 8 | * |
| 9 | * For full copyright and license information, please see |
| 10 | * the docs/CREDITS.txt file. |
| 11 | * |
| 12 | */ |
| 13 | |
| 14 | namespace phpbb\storage\provider; |
| 15 | |
| 16 | use phpbb\language\language; |
| 17 | |
| 18 | class local implements provider_interface |
| 19 | { |
| 20 | /** |
| 21 | * @var language |
| 22 | */ |
| 23 | protected $language; |
| 24 | |
| 25 | /** |
| 26 | * Constructor |
| 27 | * |
| 28 | * @param language $language |
| 29 | */ |
| 30 | public function __construct(language $language) |
| 31 | { |
| 32 | $this->language = $language; |
| 33 | } |
| 34 | |
| 35 | /** |
| 36 | * {@inheritdoc} |
| 37 | */ |
| 38 | public function get_name(): string |
| 39 | { |
| 40 | return 'local'; |
| 41 | } |
| 42 | |
| 43 | public function get_title(): string |
| 44 | { |
| 45 | return $this->language->lang('STORAGE_ADAPTER_LOCAL_NAME'); |
| 46 | } |
| 47 | |
| 48 | /** |
| 49 | * {@inheritdoc} |
| 50 | */ |
| 51 | public function get_adapter_class(): string |
| 52 | { |
| 53 | return \phpbb\storage\adapter\local::class; |
| 54 | } |
| 55 | |
| 56 | /** |
| 57 | * {@inheritdoc} |
| 58 | */ |
| 59 | public function get_options(): array |
| 60 | { |
| 61 | return [ |
| 62 | 'path' => [ |
| 63 | 'title' => $this->language->lang('STORAGE_ADAPTER_LOCAL_OPTION_PATH'), |
| 64 | 'description' => $this->language->lang('STORAGE_ADAPTER_LOCAL_OPTION_PATH_EXPLAIN'), |
| 65 | 'form_macro' => [ |
| 66 | 'tag' => 'input', |
| 67 | 'type' => 'text', |
| 68 | ], |
| 69 | ], |
| 70 | ]; |
| 71 | } |
| 72 | |
| 73 | /** |
| 74 | * {@inheritdoc} |
| 75 | */ |
| 76 | public function is_available(): bool |
| 77 | { |
| 78 | return true; |
| 79 | } |
| 80 | } |