Verzeichnisstruktur phpBB-3.1.0


Veröffentlicht
27.10.2014

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.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

      (Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

purge.php

Zuletzt modifiziert: 09.10.2024, 12:55 - Dateigröße: 2.32 KiB


 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\cache;
 14   
 15  use Symfony\Component\Console\Input\InputInterface;
 16  use Symfony\Component\Console\Output\OutputInterface;
 17   
 18  class purge extends \phpbb\console\command\command
 19  {
 20      /** @var \phpbb\cache\driver\driver_interface */
 21      protected $cache;
 22   
 23      /** @var \phpbb\db\driver\driver_interface */
 24      protected $db;
 25   
 26      /** @var \phpbb\auth\auth */
 27      protected $auth;
 28   
 29      /** @var \phpbb\log\log_interface */
 30      protected $log;
 31   
 32      /** @var \phpbb\config\config */
 33      protected $config;
 34   
 35      /**
 36      * Constructor
 37      *
 38      * @param \phpbb\user                            $user    User instance
 39      * @param \phpbb\cache\driver\driver_interface    $cache    Cache instance
 40      * @param \phpbb\db\driver\driver_interface        $db        Database connection
 41      * @param \phpbb\auth\auth                        $auth    Auth instance
 42      * @param \phpbb\log\log                            $log    Logger instance
 43      * @param \phpbb\config\config                    $config    Config instance
 44      */
 45      public function __construct(\phpbb\user $user, \phpbb\cache\driver\driver_interface $cache, \phpbb\db\driver\driver_interface $db, \phpbb\auth\auth $auth, \phpbb\log\log_interface $log, \phpbb\config\config $config)
 46      {
 47          $this->cache = $cache;
 48          $this->db = $db;
 49          $this->auth = $auth;
 50          $this->log = $log;
 51          $this->config = $config;
 52          parent::__construct($user);
 53      }
 54   
 55      /**
 56      * {@inheritdoc}
 57      */
 58      protected function configure()
 59      {
 60          $this
 61              ->setName('cache:purge')
 62              ->setDescription($this->user->lang('PURGE_CACHE'))
 63          ;
 64      }
 65   
 66      /**
 67      * Executes the command cache:purge.
 68      *
 69      * Purge the cache (including permissions) and increment the asset_version number
 70      *
 71      * @param InputInterface  $input  An InputInterface instance
 72      * @param OutputInterface $output An OutputInterface instance
 73      *
 74      * @return null
 75      */
 76      protected function execute(InputInterface $input, OutputInterface $output)
 77      {
 78          $this->config->increment('assets_version', 1);
 79          $this->cache->purge();
 80   
 81          // Clear permissions
 82          $this->auth->acl_clear_prefetch();
 83          phpbb_cache_moderators($this->db, $this->cache, $this->auth);
 84   
 85          $this->log->add('admin', ANONYMOUS, '', 'LOG_PURGE_CACHE', time(), array());
 86   
 87          $output->writeln($this->user->lang('PURGE_CACHE_SUCCESS'));
 88      }
 89  }
 90