container = new Container(); $this->container->set(self::class, $this); $this->load_components(); } /** * Load the core components of the module. */ private function load_components() { // Admin Settings Page if (is_admin()) { $this->container->get(\Awas\AdvancedSearch\Admin\Settings::class)->init(); } // Frontend Shortcodes $this->container->get(\Awas\AdvancedSearch\Frontend\Shortcodes::class)->init(); // Database Schema & Installer $this->container->get(\Awas\AdvancedSearch\Database\Schema::class)->init(); // Indexing Observers $this->container->get(\Awas\AdvancedSearch\Indexing\Observers::class)->init(); // REST API Endpoints $this->container->get(\Awas\AdvancedSearch\Api\Endpoints::class)->init(); } /** * Get the container instance. * * @return Container */ public function get_container() { return $this->container; } }