Verzeichnisstruktur phpBB-3.2.0
- Veröffentlicht
- 06.01.2017
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
console_migrator_output_handler.php
01 <?php
02 /**
03 *
04 * This file is part of the phpBB Forum Software package.
05 *
06 * @copyright (c) phpBB Limited <https://www.phpbb.com>
07 * @license GNU General Public License, version 2 (GPL-2.0)
08 *
09 * For full copyright and license information, please see
10 * the docs/CREDITS.txt file.
11 *
12 */
13
14 namespace phpbb\console\command\db;
15
16 use phpbb\db\output_handler\migrator_output_handler_interface;
17 use phpbb\user;
18 use Symfony\Component\Console\Output\OutputInterface;
19
20 class console_migrator_output_handler implements migrator_output_handler_interface
21 {
22 /**
23 * User object.
24 *
25 * @var user
26 */
27 private $user;
28
29 /**
30 * Console output object.
31 *
32 * @var OutputInterface
33 */
34 private $output;
35
36 /**
37 * Constructor
38 *
39 * @param user $user User object
40 * @param OutputInterface $output Console output object
41 */
42 public function __construct(user $user, OutputInterface $output)
43 {
44 $this->user = $user;
45 $this->output = $output;
46 }
47
48 /**
49 * {@inheritdoc}
50 */
51 public function write($message, $verbosity)
52 {
53 if ($verbosity <= $this->output->getVerbosity())
54 {
55 $translated_message = call_user_func_array(array($this->user, 'lang'), $message);
56
57 if ($verbosity === migrator_output_handler_interface::VERBOSITY_NORMAL)
58 {
59 $translated_message = '<info>' . $translated_message . '</info>';
60 }
61 else if ($verbosity === migrator_output_handler_interface::VERBOSITY_VERBOSE)
62 {
63 $translated_message = '<comment>' . $translated_message . '</comment>';
64 }
65
66 $this->output->writeln($translated_message);
67 }
68 }
69 }
70