Plugin::boot( TribeEventsVirtual?Tribe__Container $container = null )

Boots the plugin class and registers it as a singleton.

Note this specifically doesn’t have a typing for the container, just a type hinting via Docblocks, it helps avoid problems with deprecation since this is loaded so early.


Parameters

$container

(TribeEventsVirtual?Tribe__Container) (Optional) The container to use, if any. If not provided, the global container will be used.

Default value: null


Top ↑

Source

File: src/Tribe/Plugin.php

	public static function boot( $container = null ): void {
		$plugin = new static();
		$plugin->register_autoloader();
		$plugin->set_container( $container );
		$plugin->container->singleton( static::class, $plugin );

		$plugin->register();
	}

Top ↑

Changelog

Changelog
Version Description
1.14.0 Introduced.