Automattic\WooCommerce\Vendor\League\Container
Container::add()
Add an item to the container.
Method of the class: Container{}
No Hooks.
Returns
DefinitionInterface
.
Usage
$Container = new Container(); $Container->add( $id, $concrete, ?bool $shared ) : DefinitionInterface;
- $id(string) (required)
- -
- $concrete(mixed)
- -
Default: null - ?bool $shared **
- -
Default: null
Container::add() Container::add code WC 9.8.5
public function add(string $id, $concrete = null, ?bool $shared = null) : DefinitionInterface { $concrete = $concrete ?? $id; $shared = $shared ?? $this->defaultToShared; return $this->definitions->add($id, $concrete, $shared); }