Automattic\WooCommerce\Internal\DependencyManagement

RuntimeContainer::has()publicWC 1.0

Tells if the 'get' method can be used to resolve a given class.

Метод класса: 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() WC 9.5.1

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 ] );
}