PHP Class Doctrine\Common\Cache\FileCache

Since: 2.3
Author: Fabio B. Silva ([email protected])
Inheritance: extends CacheProvider
Datei anzeigen Open project: doctrine/cache Class Usage Examples

Protected Properties

Property Type Description
$directory string The cache directory.

Public Methods

Method Description
__construct ( string $directory, string $extension = '', $umask = 2 ) Constructor.
getDirectory ( ) : string Gets the cache directory.
getExtension ( ) : string Gets the cache file extension.

Protected Methods

Method Description
doDelete ( $id )
doFlush ( )
doGetStats ( )
getFilename ( string $id ) : string
writeFile ( string $filename, string $content ) : boolean Writes a string content to file in an atomic way.

Private Methods

Method Description
createPathIfNeeded ( string $path ) : boolean Create path if needed.
getIterator ( ) : Iterator
isFilenameEndingWithExtension ( string $name ) : boolean

Method Details

__construct() public method

Constructor.
public __construct ( string $directory, string $extension = '', $umask = 2 )
$directory string The cache directory.
$extension string The cache file extension.

doDelete() protected method

protected doDelete ( $id )

doFlush() protected method

protected doFlush ( )

doGetStats() protected method

protected doGetStats ( )

getDirectory() public method

Gets the cache directory.
public getDirectory ( ) : string
return string

getExtension() public method

Gets the cache file extension.
public getExtension ( ) : string
return string

getFilename() protected method

protected getFilename ( string $id ) : string
$id string
return string

writeFile() protected method

Writes a string content to file in an atomic way.
protected writeFile ( string $filename, string $content ) : boolean
$filename string Path to the file where to write the data.
$content string The content to write
return boolean TRUE on success, FALSE if path cannot be created, if path is not writable or an any other error.

Property Details

$directory protected_oe property

The cache directory.
protected string $directory
return string