src/Sonic.php
public static function &initInstance(EntityAuthData $platform)
	{
		if(NULL === self::$_instance)
		{
			self::$_instance = new Sonic();
		}
		
		self::$_instance->platformAuthData = $platform;
		
		self::$logger = new Logger('sonic');
		self::$logger->pushHandler(new StreamHandler(Configuration::getLogfile()));
		
		self::$_instance->setContext(Sonic::CONTEXT_PLATFORM); // needs to be explicitly set to "user"
		
		return self::$_instance;
	}
public static function &initInstance(EntityAuthData $platform)
	{
		if(NULL === self::$_instance)
		{
			self::$_instance = new Sonic();
		}
		
		self::$_instance->platformAuthData = $platform;
		
		self::$logger = new Logger('sonic');
		self::$logger->pushHandler(new StreamHandler(Configuration::getLogfile()));
		
		self::$_instance->setContext(Sonic::CONTEXT_PLATFORM); // needs to be explicitly set to "user"
		
		return self::$_instance;
	}
public static function & initInstance ( EntityAuthData $ platform ) { if ( NULL === self :: $ _instance ) { self :: $ _instance = new Sonic ( ) ; } self :: $ _instance -> platformAuthData = $ platform ; self :: $ logger = new Logger ( 'sonic' ) ; self :: $ logger -> pushHandler ( new StreamHandler ( Configuration :: getLogfile ( ) ) ) ; self :: $ _instance -> setContext ( Sonic :: CONTEXT_PLATFORM ) ; // needs to be explicitly set to "user"
 return self :: $ _instance ; }
initializes the Sonic SDK using EntityAuthData of the platform

@param $config Configuration object
@param $platform EntityAuthData object of the platform

@return The Sonic instance
initializes the Sonic SDK using EntityAuthData of the platform