WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Vendor\League\Container\Definition

DefinitionAggregate::add() public WC 1.0

{@inheritdoc}

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

No Hooks.

Return

null. Nothing.

Usage

$DefinitionAggregate = new DefinitionAggregate();
$DefinitionAggregate->add( $id, $definition, $shared ) : DefinitionInterface;
$id(string) (required)
-
$definition (required)
-
$shared *(true false)*

Default: false

Code of DefinitionAggregate::add() WC 5.8.0

public function add(string $id, $definition, bool $shared = false) : DefinitionInterface
{
    if (!$definition instanceof DefinitionInterface) {
        $definition = new Definition($id, $definition);
    }

    $this->definitions[] = $definition
        ->setAlias($id)
        ->setShared($shared)
    ;

    return $definition;
}