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 |
migration_tips.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 namespace phpbb\console\command\dev;
14
15 use Symfony\Component\Console\Input\InputInterface;
16 use Symfony\Component\Console\Output\OutputInterface;
17
18 class migration_tips extends \phpbb\console\command\command
19 {
20 /** @var \phpbb\extension\manager */
21 protected $extension_manager;
22
23 public function __construct(\phpbb\user $user, \phpbb\extension\manager $extension_manager)
24 {
25 $this->extension_manager = $extension_manager;
26 parent::__construct($user);
27 }
28
29 protected function configure()
30 {
31 $this
32 ->setName('dev:migration-tips')
33 ->setDescription($this->user->lang('CLI_DESCRIPTION_FIND_MIGRATIONS'))
34 ;
35 }
36
37 protected function execute(InputInterface $input, OutputInterface $output)
38 {
39 $migrations = $this->extension_manager->get_finder()
40 ->set_extensions(array())
41 ->core_path('phpbb/db/migration/data/')
42 ->get_classes();
43 $tips = $migrations;
44
45 foreach ($migrations as $migration_class)
46 {
47 foreach ($migration_class::depends_on() as $dependency)
48 {
49 $tips_key = array_search($dependency, $tips);
50 if ($tips_key !== false)
51 {
52 unset($tips[$tips_key]);
53 }
54 }
55 }
56
57 $output->writeln("\t\tarray(");
58 foreach ($tips as $migration)
59 {
60 $output->writeln("\t\t\t'{$migration}',");
61 }
62 $output->writeln("\t\t);");
63 }
64 }
65