WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Vendor\League\Container\ServiceProvider

ServiceProviderAggregate::register() public WC 1.0

{@inheritdoc}

{} It's a method of the class: ServiceProviderAggregate{}

No Hooks.

Return

null. Nothing.

Usage

$ServiceProviderAggregate = new ServiceProviderAggregate();
$ServiceProviderAggregate->register( $service );
$service(string) (required)
-

Code of ServiceProviderAggregate::register() WC 5.8.0

public function register(string $service)
{
    if (false === $this->provides($service)) {
        throw new ContainerException(
            sprintf('(%s) is not provided by a service provider', $service)
        );
    }

    foreach ($this->getIterator() as $provider) {
        if (in_array($provider->getIdentifier(), $this->registered, true)) {
            continue;
        }

        if ($provider->provides($service)) {
            $provider->register();
            $this->registered[] = $provider->getIdentifier();
        }
    }
}