Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

(no description)

File Size: 84 lines (3 kb)
Included or required:0 times
Referenced: 1 time
Includes or requires: 0 files

Defines 1 class

cache_phpunit_dummy_datasource_versionable:: (4 methods):
  get_instance_for_cache()
  get_last_instance()
  has_value()
  load_for_cache_versioned()


Class: cache_phpunit_dummy_datasource_versionable  - X-Ref

A dummy datasource which supports versioning.

get_instance_for_cache(cache_definition $definition)   X-Ref
Returns an instance of this object for use with the cache.

param: cache_definition $definition
return: cache_phpunit_dummy_datasource New object

get_last_instance()   X-Ref
Gets the last instance that was created.

return: cache_phpunit_dummy_datasource_versionable

has_value(string $key, int $version, $data)   X-Ref
Sets up the datasource so that it has a value for a particular key.

param: string $key Key
param: int $version Version for key
param: mixed $data

load_for_cache_versioned($key, int $requiredversion, &$actualversion)   X-Ref
Loads versioned data.

param: int|string $key Key
param: int $requiredversion Minimum version number
param: mixed $actualversion Should be set to the actual version number retrieved
return: mixed Data retrieved from cache or false if none