1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-22 08:13:14 +02:00

[ticket/11700] Move all recent code to namespaces

PHPBB3-11700
This commit is contained in:
Nils Adermann
2013-09-10 14:01:09 +02:00
parent 196e1813cd
commit b95fdacdd3
420 changed files with 2316 additions and 1840 deletions

View File

@@ -6,11 +6,13 @@
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*/
namespace phpbb;
/**
* phpBB custom extensions to the PHP DateTime class
* This handles the relative formats phpBB employs
*/
class phpbb_datetime extends DateTime
class datetime extends \DateTime
{
/**
* String used to wrap the date segment which should be replaced by today/tomorrow/yesterday
@@ -28,14 +30,14 @@ class phpbb_datetime extends DateTime
static protected $format_cache = array();
/**
* Constructs a new instance of phpbb_datetime, expanded to include an argument to inject
* Constructs a new \instance of \phpbb\datetime, expanded to include an argument to inject
* the user context and modify the timezone to the users selected timezone if one is not set.
*
* @param string $time String in a format accepted by strtotime().
* @param DateTimeZone $timezone Time zone of the time.
* @param user User object for context.
*/
public function __construct($user, $time = 'now', DateTimeZone $timezone = null)
public function __construct($user, $time = 'now', \DateTimeZone $timezone = null)
{
$this->user = $user;
$timezone = $timezone ?: $this->user->timezone;