[ Index ]

PHP Cross Reference of phpBB-3.3.11-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  // Deprecated globals
  23  //
  24  define('ATTACHMENT_CATEGORY_WM', 2); // Windows Media Files - Streaming - @deprecated 3.2
  25  define('ATTACHMENT_CATEGORY_RM', 3); // Real Media Files - Streaming - @deprecated 3.2
  26  define('ATTACHMENT_CATEGORY_QUICKTIME', 6); // Quicktime/Mov files - @deprecated 3.2
  27  define('ATTACHMENT_CATEGORY_FLASH', 5); // Flash/SWF files - @deprecated 3.3
  28  
  29  /**
  30   * Sets compatibility globals in the global scope
  31   *
  32   * This function registers compatibility variables to the global
  33   * variable scope. This is required to make it possible to include this file
  34   * in a service.
  35   */
  36  function register_compatibility_globals()
  37  {
  38      global $phpbb_container;
  39  
  40      global $cache, $phpbb_dispatcher, $request, $user, $auth, $db, $config, $language, $phpbb_log;
  41      global $symfony_request, $phpbb_filesystem, $phpbb_path_helper, $phpbb_extension_manager, $template;
  42  
  43      // set up caching
  44      /* @var $cache \phpbb\cache\service */
  45      $cache = $phpbb_container->get('cache');
  46  
  47      // Instantiate some basic classes
  48      /* @var $phpbb_dispatcher \phpbb\event\dispatcher */
  49      $phpbb_dispatcher = $phpbb_container->get('dispatcher');
  50  
  51      /* @var $request \phpbb\request\request_interface */
  52      $request = $phpbb_container->get('request');
  53      // Inject request instance, so only this instance is used with request_var
  54      request_var('', 0, false, false, $request);
  55  
  56      /* @var $user \phpbb\user */
  57      $user = $phpbb_container->get('user');
  58  
  59      /* @var \phpbb\language\language $language */
  60      $language = $phpbb_container->get('language');
  61  
  62      /* @var $auth \phpbb\auth\auth */
  63      $auth = $phpbb_container->get('auth');
  64  
  65      /* @var $db \phpbb\db\driver\driver_interface */
  66      $db = $phpbb_container->get('dbal.conn');
  67  
  68      // Grab global variables, re-cache if necessary
  69      /* @var $config phpbb\config\db */
  70      $config = $phpbb_container->get('config');
  71      set_config('', '', false, $config);
  72      set_config_count('', 0, false, $config);
  73  
  74      /* @var $phpbb_log \phpbb\log\log_interface */
  75      $phpbb_log = $phpbb_container->get('log');
  76  
  77      /* @var $symfony_request \phpbb\symfony_request */
  78      $symfony_request = $phpbb_container->get('symfony_request');
  79  
  80      /* @var $phpbb_filesystem \phpbb\filesystem\filesystem_interface */
  81      $phpbb_filesystem = $phpbb_container->get('filesystem');
  82  
  83      /* @var $phpbb_path_helper \phpbb\path_helper */
  84      $phpbb_path_helper = $phpbb_container->get('path_helper');
  85  
  86      // load extensions
  87      /* @var $phpbb_extension_manager \phpbb\extension\manager */
  88      $phpbb_extension_manager = $phpbb_container->get('ext.manager');
  89  
  90      /* @var $template \phpbb\template\template */
  91      $template = $phpbb_container->get('template');
  92  }


Generated: Sat Nov 4 14:26:03 2023 Cross-referenced by PHPXref 0.7.1