Automattic\WooCommerce\Internal\DependencyManagement

AbstractServiceProvider::addprotectedWC 1.0

Register an entry in the container.

Метод класса: AbstractServiceProvider{}

Хуков нет.

Возвращает

DefinitionInterface. The generated container definition.

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->add( $id, $concrete, ?bool $shared ) : DefinitionInterface;
$id(строка) (обязательный)
Entry id (typically a class or interface name).
$concrete(разное|null)
Concrete entity to register under that id, null for automatic creation.
По умолчанию: null
?bool $shared
.
По умолчанию: null

Код AbstractServiceProvider::add() WC 9.9.5

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