[ Index ]

PHP Cross Reference of phpBB-3.2.8-deutsch

title

Body

[close]

/includes/ -> compatibility_globals.php (source)

   1  <?php
   2  /**
   3  *
   4  * This file is part of the phpBB Forum Software package.
   5  *
   6  * @copyright (c) phpBB Limited <https://www.phpbb.com>
   7  * @license GNU General Public License, version 2 (GPL-2.0)
   8  *
   9  * For full copyright and license information, please see
  10  * the docs/CREDITS.txt file.
  11  *
  12  */
  13  
  14  /**
  15  */
  16  if (!defined('IN_PHPBB'))
  17  {
  18      exit;
  19  }
  20  
  21  /**
  22   * Sets compatibility globals in the global scope
  23   *
  24   * This function registers compatibility variables to the global
  25   * variable scope. This is required to make it possible to include this file
  26   * in a service.
  27   */
  28  function register_compatibility_globals()
  29  {
  30      global $phpbb_container;
  31  
  32      global $cache, $phpbb_dispatcher, $request, $user, $auth, $db, $config, $language, $phpbb_log;
  33      global $symfony_request, $phpbb_filesystem, $phpbb_path_helper, $phpbb_extension_manager, $template;
  34  
  35      // set up caching
  36      /* @var $cache \phpbb\cache\service */
  37      $cache = $phpbb_container->get('cache');
  38  
  39      // Instantiate some basic classes
  40      /* @var $phpbb_dispatcher \phpbb\event\dispatcher */
  41      $phpbb_dispatcher = $phpbb_container->get('dispatcher');
  42  
  43      /* @var $request \phpbb\request\request_interface */
  44      $request = $phpbb_container->get('request');
  45      // Inject request instance, so only this instance is used with request_var
  46      request_var('', 0, false, false, $request);
  47  
  48      /* @var $user \phpbb\user */
  49      $user = $phpbb_container->get('user');
  50  
  51      /* @var \phpbb\language\language $language */
  52      $language = $phpbb_container->get('language');
  53  
  54      /* @var $auth \phpbb\auth\auth */
  55      $auth = $phpbb_container->get('auth');
  56  
  57      /* @var $db \phpbb\db\driver\driver_interface */
  58      $db = $phpbb_container->get('dbal.conn');
  59  
  60      // Grab global variables, re-cache if necessary
  61      /* @var $config phpbb\config\db */
  62      $config = $phpbb_container->get('config');
  63      set_config('', '', false, $config);
  64      set_config_count('', 0, false, $config);
  65  
  66      /* @var $phpbb_log \phpbb\log\log_interface */
  67      $phpbb_log = $phpbb_container->get('log');
  68  
  69      /* @var $symfony_request \phpbb\symfony_request */
  70      $symfony_request = $phpbb_container->get('symfony_request');
  71  
  72      /* @var $phpbb_filesystem \phpbb\filesystem\filesystem_interface */
  73      $phpbb_filesystem = $phpbb_container->get('filesystem');
  74  
  75      /* @var $phpbb_path_helper \phpbb\path_helper */
  76      $phpbb_path_helper = $phpbb_container->get('path_helper');
  77  
  78      // load extensions
  79      /* @var $phpbb_extension_manager \phpbb\extension\manager */
  80      $phpbb_extension_manager = $phpbb_container->get('ext.manager');
  81  
  82      /* @var $template \phpbb\template\template */
  83      $template = $phpbb_container->get('template');
  84  }


Generated: Sat Oct 26 11:28:42 2019 Cross-referenced by PHPXref 0.7.1