WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Vendor\League\Container\Definition

Definition::resolve() public WC 1.0

{@inheritdoc}

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

No Hooks.

Return

null. Nothing.

Usage

$Definition = new Definition();
$Definition->resolve( $new );
$new *(true false)*

Default: false

Code of Definition::resolve() WC 5.8.0

public function resolve(bool $new = false)
{
    $concrete = $this->concrete;

    if ($this->isShared() && $this->resolved !== null && $new === false) {
        return $this->resolved;
    }

    if (is_callable($concrete)) {
        $concrete = $this->resolveCallable($concrete);
    }

    if ($concrete instanceof RawArgumentInterface) {
        $this->resolved = $concrete->getValue();

        return $concrete->getValue();
    }

    if ($concrete instanceof ClassNameInterface) {
        $concrete = $concrete->getClassName();
    }

    if (is_string($concrete) && class_exists($concrete)) {
        $concrete = $this->resolveClass($concrete);
    }

    if (is_object($concrete)) {
        $concrete = $this->invokeMethods($concrete);
    }

    $this->resolved = $concrete;

    return $concrete;
}