WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Internal\DependencyManagement

AbstractServiceProvider::share() protected WC 1.0

Register a shared entry in the container (get always returns the same instance).

{} It's a method of the class: AbstractServiceProvider{}

No Hooks.

Return

DefinitionInterface. The generated container definition.

Usage

// protected - for code of main (parent) or child class
$result = $this->share( $id, $concrete ) : DefinitionInterface;
$id(string) (required)
Entry id (typically a class or interface name).
$concrete(mixed|null)
Concrete entity to register under that id, null for automatic creation.
Default: null

Code of AbstractServiceProvider::share() WC 5.9.0

protected function share( string $id, $concrete = null ) : DefinitionInterface {
	return $this->add( $id, $concrete, true );
}