Automattic\WooCommerce\Internal\DependencyManagement
ExtendedContainer::get_class_from_concrete()
Gets the class from the concrete regardless of type.
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..
ExtendedContainer::get_class_from_concrete() ExtendedContainer::get class from concrete code WC 9.6.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; }