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


Top ↑

Return Return

(AutomatticWooCommerceVendorLeagueContainerDefinitionDefinitionInterface) The generated definition for the container.


Top ↑

Source Source

File: src/Internal/DependencyManagement/ExtendedContainer.php


			


Top ↑

User Contributed Notes User Contributed Notes

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