ActionScheduler_ScheduleDeserializer::class_name_of
Get the class name of an object parsed with a restricted allowed_classes set.
Objects whose class was disallowed become __PHP_Incomplete_Class, which hides the original name behind get_class(); it lives in the __PHP_Incomplete_Class_Name pseudo-property instead. stdClass is never converted by PHP, so its real name is returned directly.
Метод класса: ActionScheduler_ScheduleDeserializer{}
Хуков нет.
Возвращает
string. The original class name, or '' if it cannot be determined.
Использование
// private - только в коде основоного (родительского) класса $result = $this->class_name_of( $maybe_incomplete ): string;
- $maybe_incomplete(объект) (обязательный)
- Object parsed with a restricted allowed_classes set.
Код ActionScheduler_ScheduleDeserializer::class_name_of() ActionScheduler ScheduleDeserializer::class name of WC 11.2.2
private function class_name_of( object $maybe_incomplete ): string {
if ( $maybe_incomplete instanceof __PHP_Incomplete_Class ) {
$vars = (array) $maybe_incomplete;
return isset( $vars['__PHP_Incomplete_Class_Name'] ) ? (string) $vars['__PHP_Incomplete_Class_Name'] : '';
}
return get_class( $maybe_incomplete );
}