Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
NameFilter Interface Reference

Interface for creating a cache filename. More...

Public Member Functions

 filter (string $name)
 Method to create cache filename with.
 

Detailed Description

Interface for creating a cache filename.

@subpackage Caching

Member Function Documentation

◆ filter()

NameFilter::filter ( string $name)

Method to create cache filename with.

The returning name MUST follow the rules for keys in PSR-16.

@externalurl https://www.php-fig.org/psr/psr-16/

The returning name MUST be a string of at least one character that uniquely identifies a cached item, MUST only contain the characters A-Z, a-z, 0-9, _, and . in any order in UTF-8 encoding and MUST not longer then 64 characters. The following characters are reserved for future extensions and MUST NOT be used: {}()/::@:

A provided implementing library MAY support additional characters and encodings or longer lengths, but MUST support at least that minimum.

Parameters
string$nameThe name for the cache will be most likly an url with query string
Return values
stringthe new cache name

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