Automattic\WooCommerce\Internal\DependencyManagement

ExtendedContainer::is_anonymous_class()protectedWC 1.0

Check if a class name corresponds to an anonymous class.

Method of the class: ExtendedContainer{}

No Hooks.

Return

true|false. True if the name corresponds to an anonymous class.

Usage

// protected - for code of main (parent) or child class
$result = $this->is_anonymous_class( $class_name ): bool;
$class_name(string) (required)
The class name to check.

ExtendedContainer::is_anonymous_class() code WC 8.7.0

protected function is_anonymous_class( string $class_name ): bool {
	return StringUtil::starts_with( $class_name, 'class@anonymous' );
}