public static function ahoy(array $config = [])
    {
        static $inst = null;
        if ($inst === null)
        {
            $inst = new Application();
            $inst->registry = Registry::ahoy();
            $inst->treasureChest = new Container();
            $inst->setConfig($config);
            $env = getenv('APPLICATION_ENV');
            if ($env) {
                $inst->setEnvironment($env);
            }
        }
        return $inst;
    }