Automattic\WooCommerce\Internal\DependencyManagement

RuntimeContainer::haspublicWC 1.0

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

Method of the class: RuntimeContainer{}

No Hooks.

Returns

true|false. True if the class with the supplied name can be resolved with 'get'.

Usage

$RuntimeContainer = new RuntimeContainer();
$RuntimeContainer->has( $class_name ): bool;
$class_name(string) (required)
The class name.

RuntimeContainer::has() code WC 9.9.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 ] );
}