Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
checksumable Interface Reference

Interface to apply to all the classes we want to calculate their checksum. More...

Inheritance diagram for checksumable:
backup backup_setting base_logger base_plan base_task base_controller activity_backup_setting course_backup_setting root_backup_setting section_backup_setting core_backup_html_logger database_logger error_log_logger file_logger output_indented_logger output_text_logger backup_plan restore_plan backup_task restore_task

Public Member Functions

 calculate_checksum ()
 This function will return one unique and stable checksum for one instance of the class implementing it.
 
 is_checksum_correct ($checksum)
 Given one checksum, returns if matches object's checksum (true) or no (false)
 

Detailed Description

Interface to apply to all the classes we want to calculate their checksum.

Each class being part of @backup_controller will implement this interface in order to be able to calculate one objective and unique checksum for the whole controller class.

TODO: Finish phpdocs

Member Function Documentation

◆ calculate_checksum()

checksumable::calculate_checksum ( )

This function will return one unique and stable checksum for one instance of the class implementing it.

It's each implementation responsibility to do it recursively if needed and use optional store (caching) of the checksum if necessary/possible

Implemented in backup_controller, backup_setting, base_logger, base_plan, base_task, and restore_controller.

◆ is_checksum_correct()

checksumable::is_checksum_correct ( $checksum)

Given one checksum, returns if matches object's checksum (true) or no (false)

Implemented in backup_controller, backup_setting, base_logger, base_plan, base_task, and restore_controller.


The documentation for this interface was generated from the following file: