[ Index ]

PHP Cross Reference of phpBB-3.2.0-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, $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 $auth \phpbb\auth\auth */
  52      $auth = $phpbb_container->get('auth');
  53  
  54      /* @var $db \phpbb\db\driver\driver_interface */
  55      $db = $phpbb_container->get('dbal.conn');
  56  
  57      // Grab global variables, re-cache if necessary
  58      /* @var $config phpbb\config\db */
  59      $config = $phpbb_container->get('config');
  60      set_config('', '', false, $config);
  61      set_config_count('', 0, false, $config);
  62  
  63      /* @var $phpbb_log \phpbb\log\log_interface */
  64      $phpbb_log = $phpbb_container->get('log');
  65  
  66      /* @var $symfony_request \phpbb\symfony_request */
  67      $symfony_request = $phpbb_container->get('symfony_request');
  68  
  69      /* @var $phpbb_filesystem \phpbb\filesystem\filesystem_interface */
  70      $phpbb_filesystem = $phpbb_container->get('filesystem');
  71  
  72      /* @var $phpbb_path_helper \phpbb\path_helper */
  73      $phpbb_path_helper = $phpbb_container->get('path_helper');
  74  
  75      // load extensions
  76      /* @var $phpbb_extension_manager \phpbb\extension\manager */
  77      $phpbb_extension_manager = $phpbb_container->get('ext.manager');
  78  
  79      /* @var $template \phpbb\template\template */
  80      $template = $phpbb_container->get('template');
  81  }


Generated: Sun Feb 19 19:47:08 2017 Cross-referenced by PHPXref 0.7.1