WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Internal\DependencyManagement

ExtendedContainer::get_class_from_concrete() protected WC 1.0

Gets the class from the concrete regardless of type.

{} It's a method of the class: ExtendedContainer{}

No Hooks.

Return

String|null. The class from the concrete if one is available, null otherwise.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_class_from_concrete( $concrete );
$concrete(mixed) (required)
The concrete that we want the class from..

Code of ExtendedContainer::get_class_from_concrete() WC 5.9.0

protected function get_class_from_concrete( $concrete ) {
	if ( is_object( $concrete ) && ! is_callable( $concrete ) ) {
		if ( $concrete instanceof DefinitionInterface ) {
			return $this->get_class_from_concrete( $concrete->getConcrete() );
		}

		return get_class( $concrete );
	}

	if ( is_string( $concrete ) && class_exists( $concrete ) ) {
		return $concrete;
	}

	return null;
}