. namespace core_cache; use moodleform; use stdClass; /** * Cache store feature: configurable. * * This feature should be implemented by all cache stores that are configurable when adding an instance. * It requires the implementation of methods required to convert form data into the a configuration array for the * store instance, and then the reverse converting configuration data into an array that can be used to set the * data for the edit form. * * Can be implemented by classes already implementing store. * @package core_cache * @copyright Sam Hemelryk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ interface configurable_cache_interface { /** * Given the data from the add instance form this function creates a configuration array. * * @param stdClass $data * @return array */ public static function config_get_configuration_array($data); /** * Allows the cache store to set its data against the edit form before it is shown to the user. * * @param moodleform $editform * @param array $config */ public static function config_set_edit_form_data(moodleform $editform, array $config); } // Alias this class to the old name. // This file will be autoloaded by the legacyclasses autoload system. // In future all uses of this class will be corrected and the legacy references will be removed. class_alias(configurable_cache_interface::class, \cache_is_configurable::class);