public static function register_providers()
    {
        $provider_instances = [];

        foreach (static::$container->get(Config::class)->get('services.providers') as $provider) {
            try {
                $provider = static::$container->resolve($provider);
                $provider->register();

                $provider_instances[] = $provider;
            } catch (Exception $e) {
                // Fail silently if in production, otherwise throw originalException.
                if (\defined('WP_DEBUG') && WP_DEBUG) {
                    throw new ContainerException($e->getMessage());
                }
            }
        }

        foreach ($provider_instances as $provider) {
            static::$container->resolve_method($provider, 'boot');
        }
    }
public static function register_providers()
    {
        $provider_instances = [];

        foreach (static::$container->get(Config::class)->get('services.providers') as $provider) {
            try {
                $provider = static::$container->resolve($provider);
                $provider->register();

                $provider_instances[] = $provider;
            } catch (Exception $e) {
                // Fail silently if in production, otherwise throw originalException.
                if (\defined('WP_DEBUG') && WP_DEBUG) {
                    throw new ContainerException($e->getMessage());
                }
            }
        }

        foreach ($provider_instances as $provider) {
            static::$container->resolve_method($provider, 'boot');
        }
    }
public static function register_providers ( ) { $ provider_instances = [ ] ; foreach ( static :: $ container -> get ( Config :: class ) -> get ( 'services.providers' ) as $ provider ) { try { $ provider = static :: $ container -> resolve ( $ provider ) ; $ provider -> register ( ) ; $ provider_instances [ ] = $ provider ; } catch ( Exception $ e ) { // Fail silently if in production, otherwise throw originalException. if ( \ defined ( 'WP_DEBUG' ) && WP_DEBUG ) { throw new ContainerException ( $ e -> getMessage ( ) ) ; } } } foreach ( $ provider_instances as $ provider ) { static :: $ container -> resolve_method ( $ provider , 'boot' ) ; } }
Registers any service providers defined in theme config.

@since 1.0.0

@throws \Hodl\Exceptions\ContainerException
Registers any service providers defined in theme config .