Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
CallableNameFilter Class Reference

Creating a cache filename with callables. More...

Inheritance diagram for CallableNameFilter:

Public Member Functions

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

Detailed Description

Creating a cache filename with callables.

@subpackage Caching

Member Function Documentation

◆ filter()

CallableNameFilter::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 class was generated from the following file: