Automattic\WooCommerce\Internal\DependencyManagement
AbstractServiceProvider::add()
Register an entry in the container.
Метод класса: AbstractServiceProvider{}
Хуков нет.
Возвращает
DefinitionInterface
. The generated container definition.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->add( $id, $concrete, $shared ) : DefinitionInterface;
- $id(строка) (обязательный)
- Entry id (typically a class or interface name).
- $concrete(разное|null)
- Concrete entity to register under that id, null for automatic creation.
По умолчанию: null - $shared(true|false|null)
- Whether to register the class as shared (get always returns the same instance) or not.
По умолчанию: null
Код AbstractServiceProvider::add() AbstractServiceProvider::add WC 8.7.0
protected function add( string $id, $concrete = null, bool $shared = null ) : DefinitionInterface { return $this->getContainer()->add( $id, $concrete, $shared ); }