AbstractServiceProvider::add()protectedWC 1.0

Register an entry in the container.

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

No Hooks.


DefinitionInterface. The generated container definition.


// 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 entity to register under that id, null for automatic creation.
Default: null
Whether to register the class as shared (get always returns the same instance) or not.
Default: null

Код AbstractServiceProvider::add() WC 7.1.0

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