ExtendedContainer::add( string $class_name, mixed $concrete = null, bool|null $shared = null )
Register a class in the container.
Description Description
Parameters Parameters
- $class_name
-
(Required) Class name.
- $concrete
-
(Optional) How to resolve the class with
get
: a factory callback, a concrete instance, another class name, or null to just create an instance of the class.Default value: null
- $shared
-
(Optional) Whether the resolution should be performed only once and cached.
Default value: null
Return Return
(AutomatticWooCommerceVendorLeagueContainerDefinitionDefinitionInterface) The generated definition for the container.
Source Source
File: src/Internal/DependencyManagement/ExtendedContainer.php