Elgg\Application::create PHP Method

create() private static method

If the singleton is already set, it's returned.
private static create ( ) : self
return self
    private static function create()
    {
        if (self::$_instance === null) {
            // we need to register for shutdown before Symfony registers the
            // session_write_close() function. https://github.com/Elgg/Elgg/issues/9243
            register_shutdown_function(function () {
                // There are cases where we may exit before this function is defined
                if (function_exists('_elgg_shutdown_hook')) {
                    _elgg_shutdown_hook();
                }
            });
            self::$_instance = new self(new Di\ServiceProvider(new Config()));
        }
        return self::$_instance;
    }