Automattic\WooCommerce\Internal\DependencyManagement
RuntimeContainer::has
Tells if the 'get' method can be used to resolve a given class.
Note that 'get' can throw an exception even if this method returns true, for example for classes that are in the correct namespace but don't have a public constructor.
Метод класса: RuntimeContainer{}
Хуков нет.
Возвращает
true|false. True if the class with the supplied name can be resolved with 'get'.
Использование
$RuntimeContainer = new RuntimeContainer(); $RuntimeContainer->has( $class_name ): bool;
- $class_name(строка) (обязательный)
- The class name.
Код RuntimeContainer::has() RuntimeContainer::has WC 10.4.3
public function has( string $class_name ): bool {
$class_name = trim( $class_name, '\\' );
return $this->is_class_allowed( $class_name ) || isset( $this->resolved_cache[ $class_name ] );
}