Automattic\WooCommerce\Vendor\League\Container\Definition
Definition::resolve()
{@inheritdoc}
Метод класса: Definition{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$Definition = new Definition(); $Definition->resolve( $new );
- $new(true|false)
- -
По умолчанию: false
Код Definition::resolve() Definition::resolve WC 9.4.2
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); } if (is_string($concrete) && $this->getContainer()->has($concrete)) { $concrete = $this->getContainer()->get($concrete); } $this->resolved = $concrete; return $concrete; }