1 | <?php |
||
27 | class tool extends command |
||
28 | { |
||
29 | /** @var InputInterface */ |
||
30 | protected $input; |
||
31 | |||
32 | /** @var OutputInterface */ |
||
33 | protected $output; |
||
34 | |||
35 | /** @var db */ |
||
36 | protected $db; |
||
37 | |||
38 | /** @var phpbb_db_tools */ |
||
39 | protected $phpbb_db_tools; |
||
40 | |||
41 | /** @var db_tool */ |
||
42 | protected $db_tool; |
||
43 | |||
44 | /** @var db_lock */ |
||
45 | protected $db_lock; |
||
46 | |||
47 | /** @var language */ |
||
48 | protected $language; |
||
49 | |||
50 | /** |
||
51 | * Constructor |
||
52 | * |
||
53 | * @param \phpbb\user $user |
||
54 | * @param \phpbb\db\driver\driver_interface $db |
||
55 | * @param \phpbb\db\tools\tools_interface $phpbb_db_tools |
||
56 | * @param \vse\dbtool\tool\tool_interface $db_tool |
||
57 | * @param \phpbb\lock\db $db_lock |
||
58 | * @param \phpbb\language\language $language |
||
59 | */ |
||
60 | public function __construct(user $user, db $db, phpbb_db_tools $phpbb_db_tools, db_tool $db_tool, db_lock $db_lock, language $language) |
||
71 | |||
72 | /** |
||
73 | * {@inheritdoc} |
||
74 | */ |
||
75 | protected function configure() |
||
93 | |||
94 | /** |
||
95 | * Execute the DB Tool command |
||
96 | * |
||
97 | * @param InputInterface $input An InputInterface instance |
||
98 | * @param OutputInterface $output An OutputInterface instance |
||
99 | * |
||
100 | * @return int 0 if all is well, 1 if any errors occurred |
||
101 | */ |
||
102 | protected function execute(InputInterface $input, OutputInterface $output) |
||
142 | |||
143 | /** |
||
144 | * Replace HTML break tags with newlines. |
||
145 | * Formats lang strings used in the ACP for the CLI. |
||
146 | * |
||
147 | * @param string $text |
||
148 | * @return string|null |
||
149 | */ |
||
150 | protected function br2nl($text) |
||
154 | } |
||
155 |