public static function getInstance(Config $config = null) {

		if(is_null(self::$instance)) {
			if(is_null($config)) {
				throw new ApplicationException('No configuration object provided. Cannot instantiate application.');
			}
			self::$instance = new Application($config);
		}

		return self::$instance;

	}
public static function getInstance(Config $config = null) {

		if(is_null(self::$instance)) {
			if(is_null($config)) {
				throw new ApplicationException('No configuration object provided. Cannot instantiate application.');
			}
			self::$instance = new Application($config);
		}

		return self::$instance;

	}
public static function getInstance ( Config $ config = null ) { if ( is_null ( self :: $ instance ) ) { if ( is_null ( $ config ) ) { throw new ApplicationException ( 'No configuration object provided. Cannot instantiate application.' ) ; } self :: $ instance = new Application ( $ config ) ; } return self :: $ instance ; }
Get Application instance.

@param Config $config
@return Application
@throws ApplicationException
Get Application instance .