mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-21 16:01:40 +02:00
[ticket/11700] Modify all code to use the new interface names
PHPBB3-11700
This commit is contained in:
@@ -47,7 +47,7 @@ class phpbb_auth_provider_apache extends phpbb_auth_provider_base
|
||||
*/
|
||||
public function init()
|
||||
{
|
||||
if (!$this->request->is_set('PHP_AUTH_USER', phpbb_request_interface::SERVER) || $this->user->data['username'] !== htmlspecialchars_decode($this->request->server('PHP_AUTH_USER')))
|
||||
if (!$this->request->is_set('PHP_AUTH_USER', phpbb_request_request_interface::SERVER) || $this->user->data['username'] !== htmlspecialchars_decode($this->request->server('PHP_AUTH_USER')))
|
||||
{
|
||||
return $this->user->lang['APACHE_SETUP_BEFORE_USE'];
|
||||
}
|
||||
@@ -78,7 +78,7 @@ class phpbb_auth_provider_apache extends phpbb_auth_provider_base
|
||||
);
|
||||
}
|
||||
|
||||
if (!$this->request->is_set('PHP_AUTH_USER', phpbb_request_interface::SERVER))
|
||||
if (!$this->request->is_set('PHP_AUTH_USER', phpbb_request_request_interface::SERVER))
|
||||
{
|
||||
return array(
|
||||
'status' => LOGIN_ERROR_EXTERNAL_AUTH,
|
||||
@@ -149,7 +149,7 @@ class phpbb_auth_provider_apache extends phpbb_auth_provider_base
|
||||
*/
|
||||
public function autologin()
|
||||
{
|
||||
if (!$this->request->is_set('PHP_AUTH_USER', phpbb_request_interface::SERVER))
|
||||
if (!$this->request->is_set('PHP_AUTH_USER', phpbb_request_request_interface::SERVER))
|
||||
{
|
||||
return array();
|
||||
}
|
||||
@@ -241,7 +241,7 @@ class phpbb_auth_provider_apache extends phpbb_auth_provider_base
|
||||
public function validate_session($user)
|
||||
{
|
||||
// Check if PHP_AUTH_USER is set and handle this case
|
||||
if ($this->request->is_set('PHP_AUTH_USER', phpbb_request_interface::SERVER))
|
||||
if ($this->request->is_set('PHP_AUTH_USER', phpbb_request_request_interface::SERVER))
|
||||
{
|
||||
$php_auth_user = $this->request->server('PHP_AUTH_USER');
|
||||
|
||||
|
@@ -20,7 +20,7 @@ if (!defined('IN_PHPBB'))
|
||||
*
|
||||
* @package auth
|
||||
*/
|
||||
abstract class phpbb_auth_provider_base implements phpbb_auth_provider_interface
|
||||
abstract class phpbb_auth_provider_base implements phpbb_auth_provider_provider_interface
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
|
@@ -19,7 +19,7 @@ if (!defined('IN_PHPBB'))
|
||||
* Base class for avatar drivers
|
||||
* @package phpBB3
|
||||
*/
|
||||
abstract class phpbb_avatar_driver implements phpbb_avatar_driver_interface
|
||||
abstract class phpbb_avatar_driver implements phpbb_avatar_driver_driver_interface
|
||||
{
|
||||
/**
|
||||
* Avatar driver name
|
||||
@@ -47,7 +47,7 @@ abstract class phpbb_avatar_driver implements phpbb_avatar_driver_interface
|
||||
|
||||
/**
|
||||
* Cache driver
|
||||
* @var phpbb_cache_driver_interface
|
||||
* @var phpbb_cache_driver_driver_interface
|
||||
*/
|
||||
protected $cache;
|
||||
|
||||
@@ -73,9 +73,9 @@ abstract class phpbb_avatar_driver implements phpbb_avatar_driver_interface
|
||||
* @param phpbb_request $request Request object
|
||||
* @param string $phpbb_root_path Path to the phpBB root
|
||||
* @param string $php_ext PHP file extension
|
||||
* @param phpbb_cache_driver_interface $cache Cache driver
|
||||
* @param phpbb_cache_driver_driver_interface $cache Cache driver
|
||||
*/
|
||||
public function __construct(phpbb_config $config, $phpbb_root_path, $php_ext, phpbb_cache_driver_interface $cache = null)
|
||||
public function __construct(phpbb_config $config, $phpbb_root_path, $php_ext, phpbb_cache_driver_driver_interface $cache = null)
|
||||
{
|
||||
$this->config = $config;
|
||||
$this->phpbb_root_path = $phpbb_root_path;
|
||||
|
2
phpBB/phpbb/cache/driver/base.php
vendored
2
phpBB/phpbb/cache/driver/base.php
vendored
@@ -18,6 +18,6 @@ if (!defined('IN_PHPBB'))
|
||||
/**
|
||||
* @package acm
|
||||
*/
|
||||
abstract class phpbb_cache_driver_base implements phpbb_cache_driver_interface
|
||||
abstract class phpbb_cache_driver_base implements phpbb_cache_driver_driver_interface
|
||||
{
|
||||
}
|
||||
|
12
phpBB/phpbb/cache/service.php
vendored
12
phpBB/phpbb/cache/service.php
vendored
@@ -24,7 +24,7 @@ class phpbb_cache_service
|
||||
/**
|
||||
* Cache driver.
|
||||
*
|
||||
* @var phpbb_cache_driver_interface
|
||||
* @var phpbb_cache_driver_driver_interface
|
||||
*/
|
||||
protected $driver;
|
||||
|
||||
@@ -59,13 +59,13 @@ class phpbb_cache_service
|
||||
/**
|
||||
* Creates a cache service around a cache driver
|
||||
*
|
||||
* @param phpbb_cache_driver_interface $driver The cache driver
|
||||
* @param phpbb_cache_driver_driver_interface $driver The cache driver
|
||||
* @param phpbb_config $config The config
|
||||
* @param phpbb_db_driver $db Database connection
|
||||
* @param string $phpbb_root_path Root path
|
||||
* @param string $php_ext PHP extension
|
||||
*/
|
||||
public function __construct(phpbb_cache_driver_interface $driver, phpbb_config $config, phpbb_db_driver $db, $phpbb_root_path, $php_ext)
|
||||
public function __construct(phpbb_cache_driver_driver_interface $driver, phpbb_config $config, phpbb_db_driver $db, $phpbb_root_path, $php_ext)
|
||||
{
|
||||
$this->set_driver($driver);
|
||||
$this->config = $config;
|
||||
@@ -77,7 +77,7 @@ class phpbb_cache_service
|
||||
/**
|
||||
* Returns the cache driver used by this cache service.
|
||||
*
|
||||
* @return phpbb_cache_driver_interface The cache driver
|
||||
* @return phpbb_cache_driver_driver_interface The cache driver
|
||||
*/
|
||||
public function get_driver()
|
||||
{
|
||||
@@ -87,9 +87,9 @@ class phpbb_cache_service
|
||||
/**
|
||||
* Replaces the cache driver used by this cache service.
|
||||
*
|
||||
* @param phpbb_cache_driver_interface $driver The cache driver
|
||||
* @param phpbb_cache_driver_driver_interface $driver The cache driver
|
||||
*/
|
||||
public function set_driver(phpbb_cache_driver_interface $driver)
|
||||
public function set_driver(phpbb_cache_driver_driver_interface $driver)
|
||||
{
|
||||
$this->driver = $driver;
|
||||
}
|
||||
|
@@ -50,9 +50,9 @@ class phpbb_class_loader
|
||||
* @param string $prefix Required class name prefix for files to be loaded
|
||||
* @param string $path Directory to load files from
|
||||
* @param string $php_ext The file extension for PHP files
|
||||
* @param phpbb_cache_driver_interface $cache An implementation of the phpBB cache interface.
|
||||
* @param phpbb_cache_driver_driver_interface $cache An implementation of the phpBB cache interface.
|
||||
*/
|
||||
public function __construct($prefix, $path, $php_ext = 'php', phpbb_cache_driver_interface $cache = null)
|
||||
public function __construct($prefix, $path, $php_ext = 'php', phpbb_cache_driver_driver_interface $cache = null)
|
||||
{
|
||||
$this->prefix = $prefix;
|
||||
$this->path = $path;
|
||||
@@ -66,9 +66,9 @@ class phpbb_class_loader
|
||||
* the class loader will resolve paths by checking for the existance of every
|
||||
* directory in the class name every time.
|
||||
*
|
||||
* @param phpbb_cache_driver_interface $cache An implementation of the phpBB cache interface.
|
||||
* @param phpbb_cache_driver_driver_interface $cache An implementation of the phpBB cache interface.
|
||||
*/
|
||||
public function set_cache(phpbb_cache_driver_interface $cache = null)
|
||||
public function set_cache(phpbb_cache_driver_driver_interface $cache = null)
|
||||
{
|
||||
if ($cache)
|
||||
{
|
||||
|
@@ -23,7 +23,7 @@ class phpbb_config_db extends phpbb_config
|
||||
{
|
||||
/**
|
||||
* Cache instance
|
||||
* @var phpbb_cache_driver_interface
|
||||
* @var phpbb_cache_driver_driver_interface
|
||||
*/
|
||||
protected $cache;
|
||||
|
||||
@@ -43,10 +43,10 @@ class phpbb_config_db extends phpbb_config
|
||||
* Creates a configuration container with a default set of values
|
||||
*
|
||||
* @param phpbb_db_driver $db Database connection
|
||||
* @param phpbb_cache_driver_interface $cache Cache instance
|
||||
* @param phpbb_cache_driver_driver_interface $cache Cache instance
|
||||
* @param string $table Configuration table name
|
||||
*/
|
||||
public function __construct(phpbb_db_driver $db, phpbb_cache_driver_interface $cache, $table)
|
||||
public function __construct(phpbb_db_driver $db, phpbb_cache_driver_driver_interface $cache, $table)
|
||||
{
|
||||
$this->db = $db;
|
||||
$this->cache = $cache;
|
||||
|
@@ -132,15 +132,15 @@ class phpbb_cron_task_core_prune_forum extends phpbb_cron_task_base implements p
|
||||
|
||||
/**
|
||||
* Parses parameters found in $request, which is an instance of
|
||||
* phpbb_request_interface.
|
||||
* phpbb_request_request_interface.
|
||||
*
|
||||
* It is expected to have a key f whose value is id of the forum to be pruned.
|
||||
*
|
||||
* @param phpbb_request_interface $request Request object.
|
||||
* @param phpbb_request_request_interface $request Request object.
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
public function parse_parameters(phpbb_request_interface $request)
|
||||
public function parse_parameters(phpbb_request_request_interface $request)
|
||||
{
|
||||
$this->forum_data = null;
|
||||
if ($request->is_set('f'))
|
||||
|
@@ -29,9 +29,9 @@ class phpbb_cron_task_core_tidy_cache extends phpbb_cron_task_base
|
||||
* Constructor.
|
||||
*
|
||||
* @param phpbb_config $config The config
|
||||
* @param phpbb_cache_driver_interface $cache The cache driver
|
||||
* @param phpbb_cache_driver_driver_interface $cache The cache driver
|
||||
*/
|
||||
public function __construct(phpbb_config $config, phpbb_cache_driver_interface $cache)
|
||||
public function __construct(phpbb_config $config, phpbb_cache_driver_driver_interface $cache)
|
||||
{
|
||||
$this->config = $config;
|
||||
$this->cache = $cache;
|
||||
|
@@ -39,14 +39,14 @@ interface phpbb_cron_task_parametrized extends phpbb_cron_task
|
||||
|
||||
/**
|
||||
* Parses parameters found in $request, which is an instance of
|
||||
* phpbb_request_interface.
|
||||
* phpbb_request_request_interface.
|
||||
*
|
||||
* $request contains user input and must not be trusted.
|
||||
* Cron task must validate all data before using it.
|
||||
*
|
||||
* @param phpbb_request_interface $request Request object.
|
||||
* @param phpbb_request_request_interface $request Request object.
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
public function parse_parameters(phpbb_request_interface $request);
|
||||
public function parse_parameters(phpbb_request_request_interface $request);
|
||||
}
|
||||
|
@@ -12,7 +12,7 @@
|
||||
*
|
||||
* @package db
|
||||
*/
|
||||
class phpbb_db_migration_tool_config implements phpbb_db_migration_tool_interface
|
||||
class phpbb_db_migration_tool_config implements phpbb_db_migration_tool_tool_interface
|
||||
{
|
||||
/** @var phpbb_config */
|
||||
protected $config;
|
||||
|
@@ -12,7 +12,7 @@
|
||||
*
|
||||
* @package db
|
||||
*/
|
||||
class phpbb_db_migration_tool_module implements phpbb_db_migration_tool_interface
|
||||
class phpbb_db_migration_tool_module implements phpbb_db_migration_tool_tool_interface
|
||||
{
|
||||
/** @var phpbb_cache_service */
|
||||
protected $cache;
|
||||
|
@@ -12,7 +12,7 @@
|
||||
*
|
||||
* @package db
|
||||
*/
|
||||
class phpbb_db_migration_tool_permission implements phpbb_db_migration_tool_interface
|
||||
class phpbb_db_migration_tool_permission implements phpbb_db_migration_tool_tool_interface
|
||||
{
|
||||
/** @var phpbb_auth */
|
||||
protected $auth;
|
||||
|
@@ -22,7 +22,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
*
|
||||
* @package extension
|
||||
*/
|
||||
class phpbb_extension_base implements phpbb_extension_interface
|
||||
class phpbb_extension_base implements phpbb_extension_extension_interface
|
||||
{
|
||||
/** @var ContainerInterface */
|
||||
protected $container;
|
||||
|
@@ -57,12 +57,12 @@ class phpbb_extension_finder
|
||||
* extensions and their locations
|
||||
* @param phpbb_filesystem $filesystem Filesystem instance
|
||||
* @param string $phpbb_root_path Path to the phpbb root directory
|
||||
* @param phpbb_cache_driver_interface $cache A cache instance or null
|
||||
* @param phpbb_cache_driver_driver_interface $cache A cache instance or null
|
||||
* @param string $php_ext php file extension
|
||||
* @param string $cache_name The name of the cache variable, defaults to
|
||||
* _ext_finder
|
||||
*/
|
||||
public function __construct(phpbb_extension_manager $extension_manager, phpbb_filesystem $filesystem, $phpbb_root_path = '', phpbb_cache_driver_interface $cache = null, $php_ext = 'php', $cache_name = '_ext_finder')
|
||||
public function __construct(phpbb_extension_manager $extension_manager, phpbb_filesystem $filesystem, $phpbb_root_path = '', phpbb_cache_driver_driver_interface $cache = null, $php_ext = 'php', $cache_name = '_ext_finder')
|
||||
{
|
||||
$this->extension_manager = $extension_manager;
|
||||
$this->filesystem = $filesystem;
|
||||
|
@@ -46,10 +46,10 @@ class phpbb_extension_manager
|
||||
* @param string $extension_table The name of the table holding extensions
|
||||
* @param string $phpbb_root_path Path to the phpbb includes directory.
|
||||
* @param string $php_ext php file extension
|
||||
* @param phpbb_cache_driver_interface $cache A cache instance or null
|
||||
* @param phpbb_cache_driver_driver_interface $cache A cache instance or null
|
||||
* @param string $cache_name The name of the cache variable, defaults to _ext
|
||||
*/
|
||||
public function __construct(ContainerInterface $container, phpbb_db_driver $db, phpbb_config $config, phpbb_filesystem $filesystem, $extension_table, $phpbb_root_path, $php_ext = 'php', phpbb_cache_driver_interface $cache = null, $cache_name = '_ext')
|
||||
public function __construct(ContainerInterface $container, phpbb_db_driver $db, phpbb_config $config, phpbb_filesystem $filesystem, $extension_table, $phpbb_root_path, $php_ext = 'php', phpbb_cache_driver_driver_interface $cache = null, $cache_name = '_ext')
|
||||
{
|
||||
$this->container = $container;
|
||||
$this->phpbb_root_path = $phpbb_root_path;
|
||||
@@ -126,7 +126,7 @@ class phpbb_extension_manager
|
||||
* Instantiates the extension meta class for the extension with the given name
|
||||
*
|
||||
* @param string $name The extension name
|
||||
* @return phpbb_extension_interface Instance of the extension meta class or
|
||||
* @return phpbb_extension_extension_interface Instance of the extension meta class or
|
||||
* phpbb_extension_base if the class does not exist
|
||||
*/
|
||||
public function get_extension($name)
|
||||
|
@@ -34,7 +34,7 @@ abstract class phpbb_feed_base
|
||||
/** @var phpbb_db_driver */
|
||||
protected $db;
|
||||
|
||||
/** @var phpbb_cache_driver_interface */
|
||||
/** @var phpbb_cache_driver_driver_interface */
|
||||
protected $cache;
|
||||
|
||||
/** @var phpbb_user */
|
||||
@@ -77,14 +77,14 @@ abstract class phpbb_feed_base
|
||||
* @param phpbb_feed_helper $helper Feed helper
|
||||
* @param phpbb_config $config Config object
|
||||
* @param phpbb_db_driver $db Database connection
|
||||
* @param phpbb_cache_driver_interface $cache Cache object
|
||||
* @param phpbb_cache_driver_driver_interface $cache Cache object
|
||||
* @param phpbb_user $user User object
|
||||
* @param phpbb_auth $auth Auth object
|
||||
* @param phpbb_content_visibility $content_visibility Auth object
|
||||
* @param string $phpEx php file extension
|
||||
* @return null
|
||||
*/
|
||||
function __construct(phpbb_feed_helper $helper, phpbb_config $config, phpbb_db_driver $db, phpbb_cache_driver_interface $cache, phpbb_user $user, phpbb_auth $auth, phpbb_content_visibility $content_visibility, $phpEx)
|
||||
function __construct(phpbb_feed_helper $helper, phpbb_config $config, phpbb_db_driver $db, phpbb_cache_driver_driver_interface $cache, phpbb_user $user, phpbb_auth $auth, phpbb_content_visibility $content_visibility, $phpEx)
|
||||
{
|
||||
$this->config = $config;
|
||||
$this->helper = $helper;
|
||||
|
@@ -23,7 +23,7 @@ if (!defined('IN_PHPBB'))
|
||||
*
|
||||
* @package phpBB3
|
||||
*/
|
||||
class phpbb_groupposition_legend implements phpbb_groupposition_interface
|
||||
class phpbb_groupposition_legend implements phpbb_groupposition_groupposition_interface
|
||||
{
|
||||
/**
|
||||
* Group is not displayed
|
||||
|
@@ -22,7 +22,7 @@ if (!defined('IN_PHPBB'))
|
||||
*
|
||||
* @package phpBB3
|
||||
*/
|
||||
class phpbb_groupposition_teampage implements phpbb_groupposition_interface
|
||||
class phpbb_groupposition_teampage implements phpbb_groupposition_groupposition_interface
|
||||
{
|
||||
/**
|
||||
* Group is not displayed
|
||||
@@ -48,7 +48,7 @@ class phpbb_groupposition_teampage implements phpbb_groupposition_interface
|
||||
|
||||
/**
|
||||
* Cache object
|
||||
* @var phpbb_cache_driver_interface
|
||||
* @var phpbb_cache_driver_driver_interface
|
||||
*/
|
||||
protected $cache;
|
||||
|
||||
@@ -57,9 +57,9 @@ class phpbb_groupposition_teampage implements phpbb_groupposition_interface
|
||||
*
|
||||
* @param phpbb_db_driver $db Database object
|
||||
* @param phpbb_user $user User object
|
||||
* @param phpbb_cache_driver_interface $cache Cache object
|
||||
* @param phpbb_cache_driver_driver_interface $cache Cache object
|
||||
*/
|
||||
public function __construct(phpbb_db_driver $db, phpbb_user $user, phpbb_cache_driver_interface $cache)
|
||||
public function __construct(phpbb_db_driver $db, phpbb_user $user, phpbb_cache_driver_driver_interface $cache)
|
||||
{
|
||||
$this->db = $db;
|
||||
$this->user = $user;
|
||||
|
@@ -31,9 +31,9 @@ class phpbb_hook_finder
|
||||
*
|
||||
* @param string $phpbb_root_path Path to the phpbb root directory
|
||||
* @param string $php_ext php file extension
|
||||
* @param phpbb_cache_driver_interface $cache A cache instance or null
|
||||
* @param phpbb_cache_driver_driver_interface $cache A cache instance or null
|
||||
*/
|
||||
public function __construct($phpbb_root_path, $php_ext, phpbb_cache_driver_interface $cache = null)
|
||||
public function __construct($phpbb_root_path, $php_ext, phpbb_cache_driver_driver_interface $cache = null)
|
||||
{
|
||||
$this->phpbb_root_path = $phpbb_root_path;
|
||||
$this->cache = $cache;
|
||||
|
@@ -20,7 +20,7 @@ if (!defined('IN_PHPBB'))
|
||||
*
|
||||
* @package phpbb_log
|
||||
*/
|
||||
class phpbb_log implements phpbb_log_interface
|
||||
class phpbb_log implements phpbb_log_log_interface
|
||||
{
|
||||
/**
|
||||
* If set, administrative user profile links will be returned and messages
|
||||
|
@@ -525,7 +525,7 @@ class phpbb_notification_manager
|
||||
{
|
||||
$type = $this->get_item_type_class($type_name);
|
||||
|
||||
if ($type instanceof phpbb_notification_type_interface && $type->is_available())
|
||||
if ($type instanceof phpbb_notification_type_type_interface && $type->is_available())
|
||||
{
|
||||
$options = array_merge(array(
|
||||
'id' => $type->get_type(),
|
||||
@@ -561,7 +561,7 @@ class phpbb_notification_manager
|
||||
{
|
||||
$method = $this->get_method_class($method_name);
|
||||
|
||||
if ($method instanceof phpbb_notification_method_interface && $method->is_available())
|
||||
if ($method instanceof phpbb_notification_method_method_interface && $method->is_available())
|
||||
{
|
||||
$subscription_methods[$method_name] = array(
|
||||
'id' => $method->get_type(),
|
||||
|
@@ -19,7 +19,7 @@ if (!defined('IN_PHPBB'))
|
||||
* Base notifications method class
|
||||
* @package notifications
|
||||
*/
|
||||
abstract class phpbb_notification_method_base implements phpbb_notification_method_interface
|
||||
abstract class phpbb_notification_method_base implements phpbb_notification_method_method_interface
|
||||
{
|
||||
/** @var phpbb_notification_manager */
|
||||
protected $notification_manager;
|
||||
@@ -30,7 +30,7 @@ abstract class phpbb_notification_method_base implements phpbb_notification_meth
|
||||
/** @var phpbb_db_driver */
|
||||
protected $db;
|
||||
|
||||
/** @var phpbb_cache_driver_interface */
|
||||
/** @var phpbb_cache_driver_driver_interface */
|
||||
protected $cache;
|
||||
|
||||
/** @var phpbb_template */
|
||||
@@ -66,7 +66,7 @@ abstract class phpbb_notification_method_base implements phpbb_notification_meth
|
||||
*
|
||||
* @param phpbb_user_loader $user_loader
|
||||
* @param phpbb_db_driver $db
|
||||
* @param phpbb_cache_driver_interface $cache
|
||||
* @param phpbb_cache_driver_driver_interface $cache
|
||||
* @param phpbb_user $user
|
||||
* @param phpbb_auth $auth
|
||||
* @param phpbb_config $config
|
||||
@@ -74,7 +74,7 @@ abstract class phpbb_notification_method_base implements phpbb_notification_meth
|
||||
* @param string $php_ext
|
||||
* @return phpbb_notification_method_base
|
||||
*/
|
||||
public function __construct(phpbb_user_loader $user_loader, phpbb_db_driver $db, phpbb_cache_driver_interface $cache, $user, phpbb_auth $auth, phpbb_config $config, $phpbb_root_path, $php_ext)
|
||||
public function __construct(phpbb_user_loader $user_loader, phpbb_db_driver $db, phpbb_cache_driver_driver_interface $cache, $user, phpbb_auth $auth, phpbb_config $config, $phpbb_root_path, $php_ext)
|
||||
{
|
||||
$this->user_loader = $user_loader;
|
||||
$this->db = $db;
|
||||
@@ -99,9 +99,9 @@ abstract class phpbb_notification_method_base implements phpbb_notification_meth
|
||||
/**
|
||||
* Add a notification to the queue
|
||||
*
|
||||
* @param phpbb_notification_type_interface $notification
|
||||
* @param phpbb_notification_type_type_interface $notification
|
||||
*/
|
||||
public function add_to_queue(phpbb_notification_type_interface $notification)
|
||||
public function add_to_queue(phpbb_notification_type_type_interface $notification)
|
||||
{
|
||||
$this->queue[] = $notification;
|
||||
}
|
||||
|
@@ -37,9 +37,9 @@ interface phpbb_notification_method_method_interface
|
||||
/**
|
||||
* Add a notification to the queue
|
||||
*
|
||||
* @param phpbb_notification_type_interface $notification
|
||||
* @param phpbb_notification_type_type_interface $notification
|
||||
*/
|
||||
public function add_to_queue(phpbb_notification_type_interface $notification);
|
||||
public function add_to_queue(phpbb_notification_type_type_interface $notification);
|
||||
|
||||
/**
|
||||
* Parse the queue and notify the users
|
||||
|
@@ -19,7 +19,7 @@ if (!defined('IN_PHPBB'))
|
||||
* Base notifications class
|
||||
* @package notifications
|
||||
*/
|
||||
abstract class phpbb_notification_type_base implements phpbb_notification_type_interface
|
||||
abstract class phpbb_notification_type_base implements phpbb_notification_type_type_interface
|
||||
{
|
||||
/** @var phpbb_notification_manager */
|
||||
protected $notification_manager;
|
||||
@@ -30,7 +30,7 @@ abstract class phpbb_notification_type_base implements phpbb_notification_type_i
|
||||
/** @var phpbb_db_driver */
|
||||
protected $db;
|
||||
|
||||
/** @var phpbb_cache_driver_interface */
|
||||
/** @var phpbb_cache_driver_driver_interface */
|
||||
protected $cache;
|
||||
|
||||
/** @var phpbb_template */
|
||||
@@ -96,7 +96,7 @@ abstract class phpbb_notification_type_base implements phpbb_notification_type_i
|
||||
*
|
||||
* @param phpbb_user_loader $user_loader
|
||||
* @param phpbb_db_driver $db
|
||||
* @param phpbb_cache_driver_interface $cache
|
||||
* @param phpbb_cache_driver_driver_interface $cache
|
||||
* @param phpbb_user $user
|
||||
* @param phpbb_auth $auth
|
||||
* @param phpbb_config $config
|
||||
@@ -107,7 +107,7 @@ abstract class phpbb_notification_type_base implements phpbb_notification_type_i
|
||||
* @param string $user_notifications_table
|
||||
* @return phpbb_notification_type_base
|
||||
*/
|
||||
public function __construct(phpbb_user_loader $user_loader, phpbb_db_driver $db, phpbb_cache_driver_interface $cache, $user, phpbb_auth $auth, phpbb_config $config, $phpbb_root_path, $php_ext, $notification_types_table, $notifications_table, $user_notifications_table)
|
||||
public function __construct(phpbb_user_loader $user_loader, phpbb_db_driver $db, phpbb_cache_driver_driver_interface $cache, $user, phpbb_auth $auth, phpbb_config $config, $phpbb_root_path, $php_ext, $notification_types_table, $notifications_table, $user_notifications_table)
|
||||
{
|
||||
$this->user_loader = $user_loader;
|
||||
$this->db = $db;
|
||||
|
@@ -29,23 +29,23 @@ class phpbb_request_deactivated_super_global implements ArrayAccess, Countable,
|
||||
private $name;
|
||||
|
||||
/**
|
||||
* @var phpbb_request_interface::POST|GET|REQUEST|COOKIE Super global constant.
|
||||
* @var phpbb_request_request_interface::POST|GET|REQUEST|COOKIE Super global constant.
|
||||
*/
|
||||
private $super_global;
|
||||
|
||||
/**
|
||||
* @var phpbb_request_interface The request class instance holding the actual request data.
|
||||
* @var phpbb_request_request_interface The request class instance holding the actual request data.
|
||||
*/
|
||||
private $request;
|
||||
|
||||
/**
|
||||
* Constructor generates an error message fitting the super global to be used within the other functions.
|
||||
*
|
||||
* @param phpbb_request_interface $request A request class instance holding the real super global data.
|
||||
* @param phpbb_request_request_interface $request A request class instance holding the real super global data.
|
||||
* @param string $name Name of the super global this is a replacement for - e.g. '_GET'.
|
||||
* @param phpbb_request_interface::POST|GET|REQUEST|COOKIE $super_global The variable's super global constant.
|
||||
* @param phpbb_request_request_interface::POST|GET|REQUEST|COOKIE $super_global The variable's super global constant.
|
||||
*/
|
||||
public function __construct(phpbb_request_interface $request, $name, $super_global)
|
||||
public function __construct(phpbb_request_request_interface $request, $name, $super_global)
|
||||
{
|
||||
$this->request = $request;
|
||||
$this->name = $name;
|
||||
|
@@ -23,18 +23,18 @@ if (!defined('IN_PHPBB'))
|
||||
*
|
||||
* @package phpbb_request
|
||||
*/
|
||||
class phpbb_request implements phpbb_request_interface
|
||||
class phpbb_request implements phpbb_request_request_interface
|
||||
{
|
||||
/**
|
||||
* @var array The names of super global variables that this class should protect if super globals are disabled.
|
||||
*/
|
||||
protected $super_globals = array(
|
||||
phpbb_request_interface::POST => '_POST',
|
||||
phpbb_request_interface::GET => '_GET',
|
||||
phpbb_request_interface::REQUEST => '_REQUEST',
|
||||
phpbb_request_interface::COOKIE => '_COOKIE',
|
||||
phpbb_request_interface::SERVER => '_SERVER',
|
||||
phpbb_request_interface::FILES => '_FILES',
|
||||
phpbb_request_request_interface::POST => '_POST',
|
||||
phpbb_request_request_interface::GET => '_GET',
|
||||
phpbb_request_request_interface::REQUEST => '_REQUEST',
|
||||
phpbb_request_request_interface::COOKIE => '_COOKIE',
|
||||
phpbb_request_request_interface::SERVER => '_SERVER',
|
||||
phpbb_request_request_interface::FILES => '_FILES',
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -78,8 +78,8 @@ class phpbb_request implements phpbb_request_interface
|
||||
}
|
||||
|
||||
// simulate request_order = GP
|
||||
$this->original_request = $this->input[phpbb_request_interface::REQUEST];
|
||||
$this->input[phpbb_request_interface::REQUEST] = $this->input[phpbb_request_interface::POST] + $this->input[phpbb_request_interface::GET];
|
||||
$this->original_request = $this->input[phpbb_request_request_interface::REQUEST];
|
||||
$this->input[phpbb_request_request_interface::REQUEST] = $this->input[phpbb_request_request_interface::POST] + $this->input[phpbb_request_request_interface::GET];
|
||||
|
||||
if ($disable_super_globals)
|
||||
{
|
||||
@@ -144,10 +144,10 @@ class phpbb_request implements phpbb_request_interface
|
||||
* @param string $var_name The name of the variable that shall be overwritten
|
||||
* @param mixed $value The value which the variable shall contain.
|
||||
* If this is null the variable will be unset.
|
||||
* @param phpbb_request_interface::POST|GET|REQUEST|COOKIE $super_global
|
||||
* @param phpbb_request_request_interface::POST|GET|REQUEST|COOKIE $super_global
|
||||
* Specifies which super global shall be changed
|
||||
*/
|
||||
public function overwrite($var_name, $value, $super_global = phpbb_request_interface::REQUEST)
|
||||
public function overwrite($var_name, $value, $super_global = phpbb_request_request_interface::REQUEST)
|
||||
{
|
||||
if (!isset($this->super_globals[$super_global]))
|
||||
{
|
||||
@@ -193,13 +193,13 @@ class phpbb_request implements phpbb_request_interface
|
||||
* This function will always return a value of the same type as the default.
|
||||
* @param bool $multibyte If $default is a string this paramater has to be true if the variable may contain any UTF-8 characters
|
||||
* Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
|
||||
* @param phpbb_request_interface::POST|GET|REQUEST|COOKIE $super_global
|
||||
* @param phpbb_request_request_interface::POST|GET|REQUEST|COOKIE $super_global
|
||||
* Specifies which super global should be used
|
||||
*
|
||||
* @return mixed The value of $_REQUEST[$var_name] run through {@link set_var set_var} to ensure that the type is the
|
||||
* the same as that of $default. If the variable is not set $default is returned.
|
||||
*/
|
||||
public function variable($var_name, $default, $multibyte = false, $super_global = phpbb_request_interface::REQUEST)
|
||||
public function variable($var_name, $default, $multibyte = false, $super_global = phpbb_request_request_interface::REQUEST)
|
||||
{
|
||||
return $this->_variable($var_name, $default, $multibyte, $super_global, true);
|
||||
}
|
||||
@@ -217,13 +217,13 @@ class phpbb_request implements phpbb_request_interface
|
||||
* This function will always return a value of the same type as the default.
|
||||
* @param bool $multibyte If $default is a string this paramater has to be true if the variable may contain any UTF-8 characters
|
||||
* Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
|
||||
* @param phpbb_request_interface::POST|GET|REQUEST|COOKIE $super_global
|
||||
* @param phpbb_request_request_interface::POST|GET|REQUEST|COOKIE $super_global
|
||||
* Specifies which super global should be used
|
||||
*
|
||||
* @return mixed The value of $_REQUEST[$var_name] run through {@link set_var set_var} to ensure that the type is the
|
||||
* the same as that of $default. If the variable is not set $default is returned.
|
||||
*/
|
||||
public function untrimmed_variable($var_name, $default, $multibyte, $super_global = phpbb_request_interface::REQUEST)
|
||||
public function untrimmed_variable($var_name, $default, $multibyte, $super_global = phpbb_request_request_interface::REQUEST)
|
||||
{
|
||||
return $this->_variable($var_name, $default, $multibyte, $super_global, false);
|
||||
}
|
||||
@@ -234,8 +234,8 @@ class phpbb_request implements phpbb_request_interface
|
||||
* Also fall back to getenv(), some CGI setups may need it (probably not, but
|
||||
* whatever).
|
||||
*
|
||||
* @param string|array $var_name See phpbb_request_interface::variable
|
||||
* @param mixed $Default See phpbb_request_interface::variable
|
||||
* @param string|array $var_name See phpbb_request_request_interface::variable
|
||||
* @param mixed $Default See phpbb_request_request_interface::variable
|
||||
*
|
||||
* @return mixed The server variable value.
|
||||
*/
|
||||
@@ -243,9 +243,9 @@ class phpbb_request implements phpbb_request_interface
|
||||
{
|
||||
$multibyte = true;
|
||||
|
||||
if ($this->is_set($var_name, phpbb_request_interface::SERVER))
|
||||
if ($this->is_set($var_name, phpbb_request_request_interface::SERVER))
|
||||
{
|
||||
return $this->variable($var_name, $default, $multibyte, phpbb_request_interface::SERVER);
|
||||
return $this->variable($var_name, $default, $multibyte, phpbb_request_request_interface::SERVER);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -259,7 +259,7 @@ class phpbb_request implements phpbb_request_interface
|
||||
* Shortcut method to retrieve the value of client HTTP headers.
|
||||
*
|
||||
* @param string|array $header_name The name of the header to retrieve.
|
||||
* @param mixed $default See phpbb_request_interface::variable
|
||||
* @param mixed $default See phpbb_request_request_interface::variable
|
||||
*
|
||||
* @return mixed The header value.
|
||||
*/
|
||||
@@ -279,7 +279,7 @@ class phpbb_request implements phpbb_request_interface
|
||||
*/
|
||||
public function file($form_name)
|
||||
{
|
||||
return $this->variable($form_name, array('name' => 'none'), false, phpbb_request_interface::FILES);
|
||||
return $this->variable($form_name, array('name' => 'none'), false, phpbb_request_request_interface::FILES);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -294,7 +294,7 @@ class phpbb_request implements phpbb_request_interface
|
||||
*/
|
||||
public function is_set_post($name)
|
||||
{
|
||||
return $this->is_set($name, phpbb_request_interface::POST);
|
||||
return $this->is_set($name, phpbb_request_request_interface::POST);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -302,12 +302,12 @@ class phpbb_request implements phpbb_request_interface
|
||||
* arrays.
|
||||
*
|
||||
* @param string $var Name of the variable
|
||||
* @param phpbb_request_interface::POST|GET|REQUEST|COOKIE $super_global
|
||||
* @param phpbb_request_request_interface::POST|GET|REQUEST|COOKIE $super_global
|
||||
* Specifies the super global which shall be checked
|
||||
*
|
||||
* @return bool True if the variable was sent as input
|
||||
*/
|
||||
public function is_set($var, $super_global = phpbb_request_interface::REQUEST)
|
||||
public function is_set($var, $super_global = phpbb_request_request_interface::REQUEST)
|
||||
{
|
||||
return isset($this->input[$super_global][$var]);
|
||||
}
|
||||
@@ -335,13 +335,13 @@ class phpbb_request implements phpbb_request_interface
|
||||
/**
|
||||
* Returns all variable names for a given super global
|
||||
*
|
||||
* @param phpbb_request_interface::POST|GET|REQUEST|COOKIE $super_global
|
||||
* @param phpbb_request_request_interface::POST|GET|REQUEST|COOKIE $super_global
|
||||
* The super global from which names shall be taken
|
||||
*
|
||||
* @return array All variable names that are set for the super global.
|
||||
* Pay attention when using these, they are unsanitised!
|
||||
*/
|
||||
public function variable_names($super_global = phpbb_request_interface::REQUEST)
|
||||
public function variable_names($super_global = phpbb_request_request_interface::REQUEST)
|
||||
{
|
||||
if (!isset($this->input[$super_global]))
|
||||
{
|
||||
@@ -362,14 +362,14 @@ class phpbb_request implements phpbb_request_interface
|
||||
* This function will always return a value of the same type as the default.
|
||||
* @param bool $multibyte If $default is a string this paramater has to be true if the variable may contain any UTF-8 characters
|
||||
* Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
|
||||
* @param phpbb_request_interface::POST|GET|REQUEST|COOKIE $super_global
|
||||
* @param phpbb_request_request_interface::POST|GET|REQUEST|COOKIE $super_global
|
||||
* Specifies which super global should be used
|
||||
* @param bool $trim Indicates whether trim() should be applied to string values.
|
||||
*
|
||||
* @return mixed The value of $_REQUEST[$var_name] run through {@link set_var set_var} to ensure that the type is the
|
||||
* the same as that of $default. If the variable is not set $default is returned.
|
||||
*/
|
||||
protected function _variable($var_name, $default, $multibyte = false, $super_global = phpbb_request_interface::REQUEST, $trim = true)
|
||||
protected function _variable($var_name, $default, $multibyte = false, $super_global = phpbb_request_request_interface::REQUEST, $trim = true)
|
||||
{
|
||||
$path = false;
|
||||
|
||||
|
@@ -43,10 +43,10 @@ interface phpbb_request_request_interface
|
||||
* @param string $var_name The name of the variable that shall be overwritten
|
||||
* @param mixed $value The value which the variable shall contain.
|
||||
* If this is null the variable will be unset.
|
||||
* @param phpbb_request_interface::POST|GET|REQUEST|COOKIE $super_global
|
||||
* @param phpbb_request_request_interface::POST|GET|REQUEST|COOKIE $super_global
|
||||
* Specifies which super global shall be changed
|
||||
*/
|
||||
public function overwrite($var_name, $value, $super_global = phpbb_request_interface::REQUEST);
|
||||
public function overwrite($var_name, $value, $super_global = phpbb_request_request_interface::REQUEST);
|
||||
|
||||
/**
|
||||
* Central type safe input handling function.
|
||||
@@ -60,19 +60,19 @@ interface phpbb_request_request_interface
|
||||
* This function will always return a value of the same type as the default.
|
||||
* @param bool $multibyte If $default is a string this paramater has to be true if the variable may contain any UTF-8 characters
|
||||
* Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
|
||||
* @param phpbb_request_interface::POST|GET|REQUEST|COOKIE $super_global
|
||||
* @param phpbb_request_request_interface::POST|GET|REQUEST|COOKIE $super_global
|
||||
* Specifies which super global should be used
|
||||
*
|
||||
* @return mixed The value of $_REQUEST[$var_name] run through {@link set_var set_var} to ensure that the type is the
|
||||
* the same as that of $default. If the variable is not set $default is returned.
|
||||
*/
|
||||
public function variable($var_name, $default, $multibyte = false, $super_global = phpbb_request_interface::REQUEST);
|
||||
public function variable($var_name, $default, $multibyte = false, $super_global = phpbb_request_request_interface::REQUEST);
|
||||
|
||||
/**
|
||||
* Shortcut method to retrieve SERVER variables.
|
||||
*
|
||||
* @param string|array $var_name See phpbb_request_interface::variable
|
||||
* @param mixed $default See phpbb_request_interface::variable
|
||||
* @param string|array $var_name See phpbb_request_request_interface::variable
|
||||
* @param mixed $default See phpbb_request_request_interface::variable
|
||||
*
|
||||
* @return mixed The server variable value.
|
||||
*/
|
||||
@@ -82,7 +82,7 @@ interface phpbb_request_request_interface
|
||||
* Shortcut method to retrieve the value of client HTTP headers.
|
||||
*
|
||||
* @param string|array $header_name The name of the header to retrieve.
|
||||
* @param mixed $default See phpbb_request_interface::variable
|
||||
* @param mixed $default See phpbb_request_request_interface::variable
|
||||
*
|
||||
* @return mixed The header value.
|
||||
*/
|
||||
@@ -105,12 +105,12 @@ interface phpbb_request_request_interface
|
||||
* arrays.
|
||||
*
|
||||
* @param string $var Name of the variable
|
||||
* @param phpbb_request_interface::POST|GET|REQUEST|COOKIE $super_global
|
||||
* @param phpbb_request_request_interface::POST|GET|REQUEST|COOKIE $super_global
|
||||
* Specifies the super global which shall be checked
|
||||
*
|
||||
* @return bool True if the variable was sent as input
|
||||
*/
|
||||
public function is_set($var, $super_global = phpbb_request_interface::REQUEST);
|
||||
public function is_set($var, $super_global = phpbb_request_request_interface::REQUEST);
|
||||
|
||||
/**
|
||||
* Checks whether the current request is an AJAX request (XMLHttpRequest)
|
||||
@@ -129,11 +129,11 @@ interface phpbb_request_request_interface
|
||||
/**
|
||||
* Returns all variable names for a given super global
|
||||
*
|
||||
* @param phpbb_request_interface::POST|GET|REQUEST|COOKIE $super_global
|
||||
* @param phpbb_request_request_interface::POST|GET|REQUEST|COOKIE $super_global
|
||||
* The super global from which names shall be taken
|
||||
*
|
||||
* @return array All variable names that are set for the super global.
|
||||
* Pay attention when using these, they are unsanitised!
|
||||
*/
|
||||
public function variable_names($super_global = phpbb_request_interface::REQUEST);
|
||||
public function variable_names($super_global = phpbb_request_request_interface::REQUEST);
|
||||
}
|
||||
|
@@ -243,7 +243,7 @@ class phpbb_session
|
||||
$this->forwarded_for = '';
|
||||
}
|
||||
|
||||
if ($request->is_set($config['cookie_name'] . '_sid', phpbb_request_interface::COOKIE) || $request->is_set($config['cookie_name'] . '_u', phpbb_request_interface::COOKIE))
|
||||
if ($request->is_set($config['cookie_name'] . '_sid', phpbb_request_request_interface::COOKIE) || $request->is_set($config['cookie_name'] . '_u', phpbb_request_request_interface::COOKIE))
|
||||
{
|
||||
$this->cookie_data['u'] = request_var($config['cookie_name'] . '_u', 0, false, true);
|
||||
$this->cookie_data['k'] = request_var($config['cookie_name'] . '_k', '', false, true);
|
||||
@@ -405,9 +405,9 @@ class phpbb_session
|
||||
|
||||
$provider = $phpbb_container->get('auth.provider.' . $method);
|
||||
|
||||
if (!($provider instanceof phpbb_auth_provider_interface))
|
||||
if (!($provider instanceof phpbb_auth_provider_provider_interface))
|
||||
{
|
||||
throw new \RuntimeException($provider . ' must implement phpbb_auth_provider_interface');
|
||||
throw new \RuntimeException($provider . ' must implement phpbb_auth_provider_provider_interface');
|
||||
}
|
||||
|
||||
$ret = $provider->validate_session($this->data);
|
||||
|
@@ -15,7 +15,7 @@ if (!defined('IN_PHPBB'))
|
||||
exit;
|
||||
}
|
||||
|
||||
abstract class phpbb_tree_nestedset implements phpbb_tree_interface
|
||||
abstract class phpbb_tree_nestedset implements phpbb_tree_tree_interface
|
||||
{
|
||||
/** @var phpbb_db_driver */
|
||||
protected $db;
|
||||
|
Reference in New Issue
Block a user