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 ); } } } }