PHP 8.0.30
Preview: Boot.php Size: 2.63 KB
/home/certprox/template.certproxywizard.com/wp-content/plugins/hostinger-reach/src/Boot.php

<?php

namespace Hostinger\Reach;

if ( ! defined( 'ABSPATH' ) ) {
    die;
}

use Hostinger\Reach\Providers\AmplitudeProvider;
use Hostinger\Reach\Providers\AssetsProvider;
use Hostinger\Reach\Providers\BlocksProvider;
use Hostinger\Reach\Providers\ClientProvider;
use Hostinger\Reach\Providers\ContainerProvider;
use Hostinger\Reach\Providers\DatabaseProvider;
use Hostinger\Reach\Providers\HostingRoutesProvider;
use Hostinger\Reach\Providers\IntegrationsProvider;
use Hostinger\Reach\Providers\JobsProvider;
use Hostinger\Reach\Providers\MenusProvider;
use Hostinger\Reach\Providers\NoticesProvider;
use Hostinger\Reach\Providers\ProviderInterface;
use Hostinger\Reach\Providers\RedirectsProvider;
use Hostinger\Reach\Providers\RoutesProvider;
use Hostinger\Reach\Providers\SurveysProvider;
use Hostinger\Reach\Providers\TrackingProvider;
use Hostinger\Reach\Providers\WebhooksProvider;
use Hostinger\Reach\Providers\WpdbProvider;

class Boot {
    private Container $container;

    private array $all_providers = array();

    private array $providers = array(
        WpdbProvider::class,
        ContainerProvider::class,
        DatabaseProvider::class,
        AssetsProvider::class,
        MenusProvider::class,
        RoutesProvider::class,
        BlocksProvider::class,
        IntegrationsProvider::class,
        RedirectsProvider::class,
        WebhooksProvider::class,
        TrackingProvider::class,
        JobsProvider::class,
        NoticesProvider::class,
    );

    private array $hostinger_providers = array(
        ClientProvider::class,
        SurveysProvider::class,
        AmplitudeProvider::class,
        HostingRoutesProvider::class,
    );

    private static ?Boot $instance = null;

    private function __construct() {
        $this->container = new Container();
    }

    public static function get_instance(): self {
        if ( self::$instance === null ) {
            self::$instance = new self();
        }

        return self::$instance;
    }

    public function plugins_loaded(): void {
        $this->set_providers();
        $this->register_providers();
    }

    public function set_providers(): void {
        $this->all_providers = $this->providers;

        if ( ! empty( $_SERVER['H_PLATFORM'] ) ) {
            $this->all_providers = array_merge( $this->all_providers, $this->hostinger_providers );
        }
    }

    private function register_providers(): void {
        foreach ( $this->all_providers as $provider_class ) {
            $provider = new $provider_class();
            if ( $provider instanceof ProviderInterface ) {
                $provider->register( $this->container );
            }
        }
    }
}

Directory Contents

Dirs: 12 × Files: 3

Name Size Perms Modified Actions
Admin DIR
- drwxr-xr-x 2026-06-14 00:14:19
Edit Download
Amplitude DIR
- drwxr-xr-x 2026-06-14 00:14:19
Edit Download
Api DIR
- drwxr-xr-x 2026-06-14 00:14:19
Edit Download
Blocks DIR
- drwxr-xr-x 2026-06-14 00:14:19
Edit Download
Dto DIR
- drwxr-xr-x 2026-06-14 00:14:19
Edit Download
- drwxr-xr-x 2026-06-14 00:14:19
Edit Download
Jobs DIR
- drwxr-xr-x 2026-06-14 00:14:19
Edit Download
Models DIR
- drwxr-xr-x 2026-06-14 00:14:19
Edit Download
Providers DIR
- drwxr-xr-x 2026-06-14 00:14:19
Edit Download
- drwxr-xr-x 2026-06-14 00:14:19
Edit Download
Setup DIR
- drwxr-xr-x 2026-06-14 00:14:19
Edit Download
Tracking DIR
- drwxr-xr-x 2026-06-14 00:14:19
Edit Download
2.63 KB lrw-r--r-- 2026-06-10 16:30:30
Edit Download
3.95 KB lrw-r--r-- 2026-06-10 16:30:30
Edit Download
6.52 KB lrw-r--r-- 2026-06-10 16:30:30
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).