WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Internal\DependencyManagement

AbstractServiceProvider::add() protected WC 1.0

Register an entry in the container.

{} 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->add( $id, $concrete, $shared ) : 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
$shared(true|false)
Whether to register the class as shared (get always returns the same instance) or not.
Default: null

Code of AbstractServiceProvider::add() WC 5.9.0

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