ActionScheduler_ScheduleDeserializer::is_schedule_implementation
Decide whether the outermost class in a schedule blob may be instantiated.
Allowed if the class is loaded and implements ActionScheduler_Schedule. A class that is not loaded cannot be validated (and, prior to this change, already produced a broken action), so rejecting it here does not regress any case that previously worked.
Method of the class: ActionScheduler_ScheduleDeserializer{}
No Hooks.
Returns
bool.
Usage
// private - for code of main (parent) class only $result = $this->is_schedule_implementation( $class_name ): bool;
- $class_name(string) (required)
- Class name discovered in the blob.
ActionScheduler_ScheduleDeserializer::is_schedule_implementation() ActionScheduler ScheduleDeserializer::is schedule implementation code WC 11.2.1
private function is_schedule_implementation( string $class_name ): bool {
if ( '' === $class_name || ! class_exists( $class_name ) ) {
return false;
}
$implements = class_implements( $class_name );
return is_array( $implements ) && isset( $implements['ActionScheduler_Schedule'] );
}