Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
Mustache_Cache_FilesystemCache Class Reference
Inheritance diagram for Mustache_Cache_FilesystemCache:
Mustache_Cache_AbstractCache Mustache_Cache

Public Member Functions

 __construct ($baseDir, $fileMode=null)
 Filesystem cache constructor.
 
 cache ($key, $value)
 Cache and load the compiled class.
 
 getLogger ()
 Get the current logger instance.
 
 load ($key)
 Load the class from cache using require_once.
 
 setLogger ($logger=null)
 Set a logger instance.
 

Protected Member Functions

 getCacheFilename ($name)
 Build the cache filename.
 
 log ($level, $message, array $context=array())
 Add a log record if logging is enabled.
 

Constructor & Destructor Documentation

◆ __construct()

Mustache_Cache_FilesystemCache::__construct ( $baseDir,
$fileMode = null )

Filesystem cache constructor.

Parameters
string$baseDirDirectory for compiled templates
int$fileModeOverride default permissions for cache files. Defaults to using the system-defined umask

Member Function Documentation

◆ cache()

Mustache_Cache_FilesystemCache::cache ( $key,
$value )

Cache and load the compiled class.

Parameters
string$key
string$value

Implements Mustache_Cache.

◆ getCacheFilename()

Mustache_Cache_FilesystemCache::getCacheFilename ( $name)
protected

Build the cache filename.

Subclasses should override for custom cache directory structures.

Parameters
string$name
Return values
string

◆ getLogger()

Mustache_Cache_AbstractCache::getLogger ( )
inherited

Get the current logger instance.

Return values
Mustache_Logger|Psr\Log\LoggerInterface

◆ load()

Mustache_Cache_FilesystemCache::load ( $key)

Load the class from cache using require_once.

Parameters
string$key
Return values
bool

Implements Mustache_Cache.

◆ log()

Mustache_Cache_AbstractCache::log ( $level,
$message,
array $context = array() )
protectedinherited

Add a log record if logging is enabled.

Parameters
string$levelThe logging level
string$messageThe log message
array$contextThe log context

◆ setLogger()

Mustache_Cache_AbstractCache::setLogger ( $logger = null)
inherited

Set a logger instance.

Parameters
Mustache_Logger | Psr\Log\LoggerInterface$logger

Implements Mustache_Cache.


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