Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
mod_lesson\cache\overrides Class Reference

Class lesson_overrides. More...

Inheritance diagram for mod_lesson\cache\overrides:
cache_data_source

Public Member Functions

 load_for_cache ($key)
 Loads the data for the key provided ready formatted for caching.
 
 load_many_for_cache (array $keys)
 Loads several keys for the cache.
 

Static Public Member Functions

static get_instance_for_cache (cache_definition $definition)
 Returns an instance of the data source class that the cache can use for loading data using the other methods specified by this interface.
 

Static Protected Attributes

static overrides $instance = null
 the singleton instance of this class.
 

Detailed Description

Class lesson_overrides.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ get_instance_for_cache()

static mod_lesson\cache\overrides::get_instance_for_cache ( cache_definition $definition)
static

Returns an instance of the data source class that the cache can use for loading data using the other methods specified by this interface.

Parameters
cache_definition$definition
Return values
object

Implements cache_data_source.

◆ load_for_cache()

mod_lesson\cache\overrides::load_for_cache ( $key)

Loads the data for the key provided ready formatted for caching.

Parameters
string | int$keyThe key to load.
Return values
mixedWhat ever data should be returned, or false if it can't be loaded.
Exceptions
coding_exception

Implements cache_data_source.

◆ load_many_for_cache()

mod_lesson\cache\overrides::load_many_for_cache ( array $keys)

Loads several keys for the cache.

Parameters
array$keysAn array of keys each of which will be string|int.
Return values
arrayAn array of matching data items.

Implements cache_data_source.


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