Automattic\WooCommerce\Utilities
StringUtil::class_name_without_namespace()
Get the name of a class without the namespace.
Метод класса: StringUtil{}
Хуков нет.
Возвращает
Строку
. The class name without the namespace.
Использование
$result = StringUtil::class_name_without_namespace( $class_name );
- $class_name(строка) (обязательный)
- The full class name.
Код StringUtil::class_name_without_namespace() StringUtil::class name without namespace WC 9.3.3
public static function class_name_without_namespace( string $class_name ) { // A '?:' would convert this to a one-liner, but WP coding standards disallow these :shrug:. $result = substr( strrchr( $class_name, '\\' ), 1 ); return $result ? $result : $class_name; }