ILIAS
Release_4_0_x_branch Revision 61816
|
Public Member Functions | |
add ($def, $config) | |
Adds a definition object to the cache. | |
set ($def, $config) | |
Unconditionally saves a definition object to the cache. | |
replace ($def, $config) | |
Replace an object in the cache. | |
get ($config) | |
Retrieves a definition object from the cache. | |
remove ($config) | |
Removes a definition object to the cache. | |
flush ($config) | |
Clears all objects from cache. | |
cleanup ($config) | |
Clears all expired (older version or revision) objects from cache. | |
generateFilePath ($config) | |
Generates the file path to the serial file corresponding to the configuration and definition name. | |
generateDirectoryPath ($config) | |
Generates the path to the directory contain this cache's serial files. | |
generateBaseDirectoryPath ($config) | |
Generates path to base directory that contains all definition type serials. | |
Public Member Functions inherited from HTMLPurifier_DefinitionCache | |
__construct ($type) | |
generateKey ($config) | |
Generates a unique identifier for a particular configuration. | |
isOld ($key, $config) | |
Tests whether or not a key is old with respect to the configuration's version and revision number. | |
checkDefType ($def) | |
Checks if a definition's type jives with the cache's type. |
Private Member Functions | |
_write ($file, $data) | |
Convenience wrapper function for file_put_contents. | |
_prepareDir ($config) | |
Prepares the directory that this type stores the serials in. | |
_testPermissions ($dir) | |
Tests permissions on a directory and throws out friendly error messages and attempts to chmod it itself if possible. |
Additional Inherited Members | |
Data Fields inherited from HTMLPurifier_DefinitionCache | |
$type |
Definition at line 3 of file Serializer.php.
|
private |
Prepares the directory that this type stores the serials in.
Definition at line 110 of file Serializer.php.
References $config, _testPermissions(), elseif(), generateBaseDirectoryPath(), and generateDirectoryPath().
Referenced by add(), cleanup(), flush(), replace(), and set().
|
private |
Tests permissions on a directory and throws out friendly error messages and attempts to chmod it itself if possible.
Definition at line 135 of file Serializer.php.
References $dir, and elseif().
Referenced by _prepareDir().
|
private |
Convenience wrapper function for file_put_contents.
$file | File name to write to |
$data | Data to write into file |
Definition at line 102 of file Serializer.php.
Referenced by add(), replace(), and set().
HTMLPurifier_DefinitionCache_Serializer::add | ( | $def, | |
$config | |||
) |
Adds a definition object to the cache.
Reimplemented from HTMLPurifier_DefinitionCache.
Definition at line 7 of file Serializer.php.
References $config, $file, _prepareDir(), _write(), HTMLPurifier_DefinitionCache\checkDefType(), and generateFilePath().
HTMLPurifier_DefinitionCache_Serializer::cleanup | ( | $config | ) |
Clears all expired (older version or revision) objects from cache.
Reimplemented from HTMLPurifier_DefinitionCache.
Definition at line 53 of file Serializer.php.
References $config, $dir, $filename, $key, _prepareDir(), generateDirectoryPath(), and HTMLPurifier_DefinitionCache\isOld().
HTMLPurifier_DefinitionCache_Serializer::flush | ( | $config | ) |
Clears all objects from cache.
Reimplemented from HTMLPurifier_DefinitionCache.
Definition at line 42 of file Serializer.php.
References $config, $dir, $filename, _prepareDir(), and generateDirectoryPath().
HTMLPurifier_DefinitionCache_Serializer::generateBaseDirectoryPath | ( | $config | ) |
Generates path to base directory that contains all definition type serials.
Definition at line 90 of file Serializer.php.
References $config.
Referenced by _prepareDir(), and generateDirectoryPath().
HTMLPurifier_DefinitionCache_Serializer::generateDirectoryPath | ( | $config | ) |
Generates the path to the directory contain this cache's serial files.
Definition at line 80 of file Serializer.php.
References $config, HTMLPurifier_DefinitionCache\$type, and generateBaseDirectoryPath().
Referenced by _prepareDir(), cleanup(), flush(), and generateFilePath().
HTMLPurifier_DefinitionCache_Serializer::generateFilePath | ( | $config | ) |
Generates the file path to the serial file corresponding to the configuration and definition name.
Definition at line 70 of file Serializer.php.
References $config, $key, generateDirectoryPath(), and HTMLPurifier_DefinitionCache\generateKey().
Referenced by add(), get(), remove(), replace(), and set().
HTMLPurifier_DefinitionCache_Serializer::get | ( | $config | ) |
Retrieves a definition object from the cache.
Reimplemented from HTMLPurifier_DefinitionCache.
Definition at line 30 of file Serializer.php.
References $config, $file, and generateFilePath().
HTMLPurifier_DefinitionCache_Serializer::remove | ( | $config | ) |
Removes a definition object to the cache.
Reimplemented from HTMLPurifier_DefinitionCache.
Definition at line 36 of file Serializer.php.
References $config, $file, and generateFilePath().
HTMLPurifier_DefinitionCache_Serializer::replace | ( | $def, | |
$config | |||
) |
Replace an object in the cache.
Reimplemented from HTMLPurifier_DefinitionCache.
Definition at line 22 of file Serializer.php.
References $config, $file, _prepareDir(), _write(), HTMLPurifier_DefinitionCache\checkDefType(), and generateFilePath().
HTMLPurifier_DefinitionCache_Serializer::set | ( | $def, | |
$config | |||
) |
Unconditionally saves a definition object to the cache.
Reimplemented from HTMLPurifier_DefinitionCache.
Definition at line 15 of file Serializer.php.
References $config, $file, _prepareDir(), _write(), HTMLPurifier_DefinitionCache\checkDefType(), and generateFilePath().