static function forceInstance(Singleton $object, $class = null)
	{
		if($class == null)
			$class = get_class($object);
		
		if(!isset(self::$instances[$class]))
		{
			self::$instances[$class] = $object;
		}
		else
		{
			throw new \Exception(sprintf('Object of class %s was previously instanciated', $class));
		}
	}
static function forceInstance(Singleton $object, $class = null)
	{
		if($class == null)
			$class = get_class($object);
		
		if(!isset(self::$instances[$class]))
		{
			self::$instances[$class] = $object;
		}
		else
		{
			throw new \Exception(sprintf('Object of class %s was previously instanciated', $class));
		}
	}
static function forceInstance ( Singleton $ object , $ class = null ) { if ( $ class == null ) $ class = get_class ( $ object ) ; if ( ! isset ( self :: $ instances [ $ class ] ) ) { self :: $ instances [ $ class ] = $ object ; } else { throw new \ Exception ( sprintf ( 'Object of class %s was previously instanciated' , $ class ) ) ; } }
Force a singleton object to be instanciated with the given instance
Use with care!
Force a singleton object to be instanciated with the given instance Use with care!