AbstractServiceProvider::share_with_auto_arguments( string $class_name, mixed $concrete = null )
Register a class in the container and use reflection to guess the injection method arguments.
Description Description
The class is registered as shared, so get
on the container always returns the same instance.
WARNING: this method uses reflection, so please have performance in mind when using it.
Parameters Parameters
- $class_name
-
(Required) Class name to register.
- $concrete
-
(Optional) The concrete to register. Can be a shared instance, a factory callback, or a class name.
Default value: null
Return Return
(AutomatticWooCommerceVendorLeagueContainerDefinitionDefinitionInterface) The generated container definition.
Source Source
File: src/Internal/DependencyManagement/AbstractServiceProvider.php