aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/groupposition
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2013-09-10 14:01:09 +0200
committerNils Adermann <naderman@naderman.de>2013-09-16 00:25:27 +0200
commitb95fdacdd378877d277e261465da73deb06e50da (patch)
tree01d55340b37f412cecd2d898c302e101b8a0ed19 /phpBB/phpbb/groupposition
parent196e1813cd37c47965eb6f254ce6a55210a1b751 (diff)
downloadforums-b95fdacdd378877d277e261465da73deb06e50da.tar
forums-b95fdacdd378877d277e261465da73deb06e50da.tar.gz
forums-b95fdacdd378877d277e261465da73deb06e50da.tar.bz2
forums-b95fdacdd378877d277e261465da73deb06e50da.tar.xz
forums-b95fdacdd378877d277e261465da73deb06e50da.zip
[ticket/11700] Move all recent code to namespaces
PHPBB3-11700
Diffstat (limited to 'phpBB/phpbb/groupposition')
-rw-r--r--phpBB/phpbb/groupposition/exception.php4
-rw-r--r--phpBB/phpbb/groupposition/groupposition_interface.php4
-rw-r--r--phpBB/phpbb/groupposition/legend.php16
-rw-r--r--phpBB/phpbb/groupposition/teampage.php32
4 files changed, 32 insertions, 24 deletions
diff --git a/phpBB/phpbb/groupposition/exception.php b/phpBB/phpbb/groupposition/exception.php
index e4ff09c703..3a8d92dbc7 100644
--- a/phpBB/phpbb/groupposition/exception.php
+++ b/phpBB/phpbb/groupposition/exception.php
@@ -7,6 +7,8 @@
*
*/
+namespace phpbb\groupposition;
+
/**
* @ignore
*/
@@ -18,6 +20,6 @@ if (!defined('IN_PHPBB'))
/**
* @package groupposition
*/
-class phpbb_groupposition_exception extends \Exception
+class exception extends \Exception
{
}
diff --git a/phpBB/phpbb/groupposition/groupposition_interface.php b/phpBB/phpbb/groupposition/groupposition_interface.php
index 0f29984588..a568785185 100644
--- a/phpBB/phpbb/groupposition/groupposition_interface.php
+++ b/phpBB/phpbb/groupposition/groupposition_interface.php
@@ -7,6 +7,8 @@
*
*/
+namespace phpbb\groupposition;
+
/**
* @ignore
*/
@@ -22,7 +24,7 @@ if (!defined('IN_PHPBB'))
*
* @package phpBB3
*/
-interface phpbb_groupposition_groupposition_interface
+interface groupposition_interface
{
/**
* Returns the value for a given group, if the group exists.
diff --git a/phpBB/phpbb/groupposition/legend.php b/phpBB/phpbb/groupposition/legend.php
index 5cbc26f528..9a1ef3d1d0 100644
--- a/phpBB/phpbb/groupposition/legend.php
+++ b/phpBB/phpbb/groupposition/legend.php
@@ -7,6 +7,8 @@
*
*/
+namespace phpbb\groupposition;
+
/**
* @ignore
*/
@@ -23,7 +25,7 @@ if (!defined('IN_PHPBB'))
*
* @package phpBB3
*/
-class phpbb_groupposition_legend implements phpbb_groupposition_groupposition_interface
+class legend implements \phpbb\groupposition\groupposition_interface
{
/**
* Group is not displayed
@@ -32,23 +34,23 @@ class phpbb_groupposition_legend implements phpbb_groupposition_groupposition_in
/**
* Database object
- * @var phpbb_db_driver
+ * @var \phpbb\db\driver\driver
*/
protected $db;
/**
* User object
- * @var phpbb_user
+ * @var \phpbb\user
*/
protected $user;
/**
* Constructor
*
- * @param phpbb_db_driver $db Database object
- * @param phpbb_user $user User object
+ * @param \phpbb\db\driver\driver $db Database object
+ * @param \phpbb\user $user User object
*/
- public function __construct(phpbb_db_driver $db, phpbb_user $user)
+ public function __construct(\phpbb\db\driver\driver $db, \phpbb\user $user)
{
$this->db = $db;
$this->user = $user;
@@ -71,7 +73,7 @@ class phpbb_groupposition_legend implements phpbb_groupposition_groupposition_in
if ($current_value === false)
{
// Group not found.
- throw new phpbb_groupposition_exception('NO_GROUP');
+ throw new \phpbb\groupposition\exception('NO_GROUP');
}
return (int) $current_value;
diff --git a/phpBB/phpbb/groupposition/teampage.php b/phpBB/phpbb/groupposition/teampage.php
index 6a0601da63..4cd2ae7fa8 100644
--- a/phpBB/phpbb/groupposition/teampage.php
+++ b/phpBB/phpbb/groupposition/teampage.php
@@ -7,6 +7,8 @@
*
*/
+namespace phpbb\groupposition;
+
/**
* @ignore
*/
@@ -22,7 +24,7 @@ if (!defined('IN_PHPBB'))
*
* @package phpBB3
*/
-class phpbb_groupposition_teampage implements phpbb_groupposition_groupposition_interface
+class teampage implements \phpbb\groupposition\groupposition_interface
{
/**
* Group is not displayed
@@ -36,30 +38,30 @@ class phpbb_groupposition_teampage implements phpbb_groupposition_groupposition_
/**
* Database object
- * @var phpbb_db_driver
+ * @var \phpbb\db\driver\driver
*/
protected $db;
/**
* User object
- * @var phpbb_user
+ * @var \phpbb\user
*/
protected $user;
/**
* Cache object
- * @var phpbb_cache_driver_driver_interface
+ * @var \phpbb\cache\driver\driver_interface
*/
protected $cache;
/**
* Constructor
*
- * @param phpbb_db_driver $db Database object
- * @param phpbb_user $user User object
- * @param phpbb_cache_driver_driver_interface $cache Cache object
+ * @param \phpbb\db\driver\driver $db Database object
+ * @param \phpbb\user $user User object
+ * @param \phpbb\cache\driver\driver_interface $cache Cache object
*/
- public function __construct(phpbb_db_driver $db, phpbb_user $user, phpbb_cache_driver_driver_interface $cache)
+ public function __construct(\phpbb\db\driver\driver $db, \phpbb\user $user, \phpbb\cache\driver\driver_interface $cache)
{
$this->db = $db;
$this->user = $user;
@@ -86,7 +88,7 @@ class phpbb_groupposition_teampage implements phpbb_groupposition_groupposition_
if ($row === false)
{
// Group not found.
- throw new phpbb_groupposition_exception('NO_GROUP');
+ throw new \phpbb\groupposition\exception('NO_GROUP');
}
return (int) $row['teampage_position'];
@@ -113,7 +115,7 @@ class phpbb_groupposition_teampage implements phpbb_groupposition_groupposition_
if ($row === false)
{
// Group not found.
- throw new phpbb_groupposition_exception('NO_GROUP');
+ throw new \phpbb\groupposition\exception('NO_GROUP');
}
return $row;
@@ -137,7 +139,7 @@ class phpbb_groupposition_teampage implements phpbb_groupposition_groupposition_
if ($current_value === false)
{
// Group not found.
- throw new phpbb_groupposition_exception('NO_GROUP');
+ throw new \phpbb\groupposition\exception('NO_GROUP');
}
return (int) $current_value;
@@ -161,7 +163,7 @@ class phpbb_groupposition_teampage implements phpbb_groupposition_groupposition_
if ($row === false)
{
// Group not found.
- throw new phpbb_groupposition_exception('NO_GROUP');
+ throw new \phpbb\groupposition\exception('NO_GROUP');
}
return $row;
@@ -261,7 +263,7 @@ class phpbb_groupposition_teampage implements phpbb_groupposition_groupposition_
}
/**
- * Adds a new category
+ * Adds a new \category
*
* @param string $category_name Name of the category to be added
* @return bool True if the category was added successfully
@@ -431,7 +433,7 @@ class phpbb_groupposition_teampage implements phpbb_groupposition_groupposition_
$sibling_count = 0;
$sibling_limit = $delta;
- // Reset the delta, as we recalculate the new real delta
+ // Reset the delta, as we recalculate the new \real delta
$delta = 0;
while ($row = $this->db->sql_fetchrow($result))
{
@@ -519,7 +521,7 @@ class phpbb_groupposition_teampage implements phpbb_groupposition_groupposition_
$sibling_count = 0;
$sibling_limit = $delta;
- // Reset the delta, as we recalculate the new real delta
+ // Reset the delta, as we recalculate the new \real delta
$delta = 0;
while ($row = $this->db->sql_fetchrow($result))
{