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

Sets the container for the class.

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 function set_container( $container = null ): void {
		$this->container = $container ?: tribe();
	}

Top ↑

Changelog

Changelog
Version Description
1.14.0 Introduced.