Verzeichnisstruktur phpBB-3.3.15
- Veröffentlicht
- 28.08.2024
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_command.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\db;
14
15 abstract class migration_command extends \phpbb\console\command\command
16 {
17 /** @var \phpbb\db\migrator */
18 protected $migrator;
19
20 /** @var \phpbb\extension\manager */
21 protected $extension_manager;
22
23 /** @var \phpbb\config\config */
24 protected $config;
25
26 /** @var \phpbb\cache\service */
27 protected $cache;
28
29 public function __construct(\phpbb\user $user, \phpbb\db\migrator $migrator, \phpbb\extension\manager $extension_manager, \phpbb\config\config $config, \phpbb\cache\service $cache)
30 {
31 $this->migrator = $migrator;
32 $this->extension_manager = $extension_manager;
33 $this->config = $config;
34 $this->cache = $cache;
35 parent::__construct($user);
36 }
37
38 protected function load_migrations()
39 {
40 $migrations = $this->extension_manager
41 ->get_finder()
42 ->core_path('phpbb/db/migration/data/')
43 ->extension_directory('/migrations')
44 ->get_classes();
45
46 $this->migrator->set_migrations($migrations);
47
48 return $this->migrator->get_migrations();
49 }
50
51 protected function finalise_update()
52 {
53 $this->cache->purge();
54 $this->config->increment('assets_version', 1);
55 }
56 }
57