Automattic\WooCommerce\Vendor\League\Container\Definition

DefinitionAggregate::getDefinition()publicWC 1.0

{@inheritdoc}

Method of the class: DefinitionAggregate{}

No Hooks.

Return

null. Nothing (null).

Usage

$DefinitionAggregate = new DefinitionAggregate();
$DefinitionAggregate->getDefinition( $id ) : DefinitionInterface;
$id(string) (required)
-

DefinitionAggregate::getDefinition() code WC 8.9.0

public function getDefinition(string $id) : DefinitionInterface
{
    foreach ($this->getIterator() as $definition) {
        if ($id === $definition->getAlias()) {
            return $definition->setLeagueContainer($this->getLeagueContainer());
        }
    }

    throw new NotFoundException(sprintf('Alias (%s) is not being handled as a definition.', $id));
}