Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/2878'
Browse files Browse the repository at this point in the history
  • Loading branch information
weierophinney committed Nov 16, 2012
2 parents 441f51a + 386dac1 commit 893db4e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function __construct($name = 'Default', Manager $manager = null)
*/
public static function setDefaultManager(Manager $manager = null)
{
self::$defaultManager = $manager;
static::$defaultManager = $manager;
}

/**
Expand All @@ -101,16 +101,16 @@ public static function setDefaultManager(Manager $manager = null)
*/
public static function getDefaultManager()
{
if (null === self::$defaultManager) {
$manager = new self::$managerDefaultClass();
if (null === static::$defaultManager) {
$manager = new static::$managerDefaultClass();
if (!$manager instanceof Manager) {
throw new Exception\InvalidArgumentException(
'Invalid default manager type provided; must implement ManagerInterface'
);
}
self::$defaultManager = $manager;
static::$defaultManager = $manager;
}
return self::$defaultManager;
return static::$defaultManager;
}

/**
Expand All @@ -133,7 +133,7 @@ public function getName()
protected function setManager(Manager $manager = null)
{
if (null === $manager) {
$manager = self::getDefaultManager();
$manager = static::getDefaultManager();
if (!$manager instanceof Manager) {
throw new Exception\InvalidArgumentException(
'Manager provided is invalid; must implement ManagerInterface'
Expand Down
6 changes: 3 additions & 3 deletions src/Validator/RemoteAddr.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function isValid()
*/
public static function setUseProxy($useProxy = true)
{
self::$useProxy = $useProxy;
static::$useProxy = $useProxy;
}

/**
Expand All @@ -82,7 +82,7 @@ public static function setUseProxy($useProxy = true)
*/
public static function getUseProxy()
{
return self::$useProxy;
return static::$useProxy;
}

/**
Expand All @@ -92,7 +92,7 @@ public static function getUseProxy()
*/
protected function getIpAddress()
{
if (self::$useProxy) {
if (static::$useProxy) {
// proxy IP address
if (isset($_SERVER['HTTP_CLIENT_IP']) && $_SERVER['HTTP_CLIENT_IP']) {
$ips = explode(',', $_SERVER['HTTP_CLIENT_IP']);
Expand Down

0 comments on commit 893db4e

Please sign in to comment.