Automattic\WooCommerce\Internal\DependencyManagement
AbstractServiceProvider::add()
Register an entry in the container.
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, ?bool $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 - ?bool $shared **
- -
Default: null
AbstractServiceProvider::add() AbstractServiceProvider::add code WC 9.5.1
protected function add( string $id, $concrete = null, ?bool $shared = null ) : DefinitionInterface { return $this->getContainer()->add( $id, $concrete, $shared ); }