XOOPS 2.5.6  Final
 All Classes Namespaces Files Functions Variables Pages
HTMLPurifier_DefinitionCache_Serializer Class Reference
Inheritance diagram for HTMLPurifier_DefinitionCache_Serializer:
Inheritance graph

Public Member Functions

 add ($def, $config)
 
 cleanup ($config)
 
 flush ($config)
 
 generateBaseDirectoryPath ($config)
 
 generateDirectoryPath ($config)
 
 generateFilePath ($config)
 
 get ($config)
 
 remove ($config)
 
 replace ($def, $config)
 
 set ($def, $config)
 
- Public Member Functions inherited from HTMLPurifier_DefinitionCache
 __construct ($type)
 
 add ($def, $config)
 
 checkDefType ($def)
 
 cleanup ($config)
 
 flush ($config)
 
 generateKey ($config)
 
 get ($config)
 
 isOld ($key, $config)
 
 remove ($config)
 
 replace ($def, $config)
 
 set ($def, $config)
 

Private Member Functions

 _prepareDir ($config)
 
 _testPermissions ($dir, $chmod)
 
 _write ($file, $data, $config)
 

Additional Inherited Members

- Public Attributes inherited from HTMLPurifier_DefinitionCache
 $type
 

Detailed Description

Definition at line 3 of file Serializer.php.

Member Function Documentation

HTMLPurifier_DefinitionCache_Serializer::_prepareDir (   $config)
private

Prepares the directory that this type stores the serials in

Parameters
$configConfig object
Returns
True if successful

Definition at line 122 of file Serializer.php.

References $config, _testPermissions(), generateBaseDirectoryPath(), and generateDirectoryPath().

Referenced by add(), cleanup(), flush(), replace(), and set().

Here is the call graph for this function:

Here is the caller graph for this function:

HTMLPurifier_DefinitionCache_Serializer::_testPermissions (   $dir,
  $chmod 
)
private

Tests permissions on a directory and throws out friendly error messages and attempts to chmod it itself if possible

Parameters
$dirDirectory path
$chmodPermissions
Returns
True if directory writable

Definition at line 154 of file Serializer.php.

References $dir.

Referenced by _prepareDir().

Here is the caller graph for this function:

HTMLPurifier_DefinitionCache_Serializer::_write (   $file,
  $data,
  $config 
)
private

Convenience wrapper function for file_put_contents

Parameters
$fileFile name to write to
$dataData to write into file
$configConfig object
Returns
Number of bytes written if success, or false if failure.

Definition at line 103 of file Serializer.php.

References $config, $file, and $result.

Referenced by add(), replace(), and set().

Here is the caller graph for this function:

HTMLPurifier_DefinitionCache_Serializer::add (   $def,
  $config 
)

Definition at line 7 of file Serializer.php.

References $config, $file, _prepareDir(), _write(), HTMLPurifier_DefinitionCache\checkDefType(), and generateFilePath().

Here is the call graph for this function:

HTMLPurifier_DefinitionCache_Serializer::cleanup (   $config)

Definition at line 53 of file Serializer.php.

References $config, $dir, _prepareDir(), generateDirectoryPath(), and HTMLPurifier_DefinitionCache\isOld().

Here is the call graph for this function:

HTMLPurifier_DefinitionCache_Serializer::flush (   $config)

Definition at line 42 of file Serializer.php.

References $config, $dir, _prepareDir(), and generateDirectoryPath().

Here is the call graph for this function:

HTMLPurifier_DefinitionCache_Serializer::generateBaseDirectoryPath (   $config)

Generates path to base directory that contains all definition type serials

Todo:
Make protected

Definition at line 90 of file Serializer.php.

References $config.

Referenced by _prepareDir(), and generateDirectoryPath().

Here is the caller graph for this function:

HTMLPurifier_DefinitionCache_Serializer::generateDirectoryPath (   $config)

Generates the path to the directory contain this cache's serial files

Note
No trailing slash
Todo:
Make protected

Definition at line 80 of file Serializer.php.

References $config, HTMLPurifier_DefinitionCache\$type, and generateBaseDirectoryPath().

Referenced by _prepareDir(), cleanup(), flush(), and generateFilePath().

Here is the call graph for this function:

Here is the caller graph for this function:

HTMLPurifier_DefinitionCache_Serializer::generateFilePath (   $config)

Generates the file path to the serial file corresponding to the configuration and definition name

Todo:
Make protected

Definition at line 70 of file Serializer.php.

References $config, generateDirectoryPath(), and HTMLPurifier_DefinitionCache\generateKey().

Referenced by add(), get(), remove(), replace(), and set().

Here is the call graph for this function:

Here is the caller graph for this function:

HTMLPurifier_DefinitionCache_Serializer::get (   $config)

Definition at line 30 of file Serializer.php.

References $config, $file, and generateFilePath().

Here is the call graph for this function:

HTMLPurifier_DefinitionCache_Serializer::remove (   $config)

Definition at line 36 of file Serializer.php.

References $config, $file, and generateFilePath().

Here is the call graph for this function:

HTMLPurifier_DefinitionCache_Serializer::replace (   $def,
  $config 
)

Definition at line 22 of file Serializer.php.

References $config, $file, _prepareDir(), _write(), HTMLPurifier_DefinitionCache\checkDefType(), and generateFilePath().

Here is the call graph for this function:

HTMLPurifier_DefinitionCache_Serializer::set (   $def,
  $config 
)

Definition at line 15 of file Serializer.php.

References $config, $file, _prepareDir(), _write(), HTMLPurifier_DefinitionCache\checkDefType(), and generateFilePath().

Here is the call graph for this function:


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