AbstractServiceProvider::add_with_auto_arguments( string $class_name, mixed $concrete = null, bool $shared = false )

Register a class in the container and use reflection to guess the injection method arguments.


Description Description

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

$shared

(Optional) Whether to register the class as shared (get always returns the same instance) or not.

Default value: false


Top ↑

Return Return

(AutomatticWooCommerceVendorLeagueContainerDefinitionDefinitionInterface) The generated container definition.


Top ↑

Source Source

File: src/Internal/DependencyManagement/AbstractServiceProvider.php


			


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.