PHP Class Minify_Cache_File, minify

Inheritance: implements Minify_CacheInterface
Afficher le fichier Open project: mrclay/minify Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( string $path = '', boolean $fileLocking = false, Psr\Log\LoggerInterface $logger = null )
display ( string $id ) Send the cached content to output
fetch ( string $id ) : string Fetch the cached content
getPath ( ) : string Fetch the cache path used
getSize ( string $id ) : integer Get the size of a cache entry
isValid ( string $id, integer $srcMtime ) : boolean Does a valid cache entry exist?
store ( string $id, string $data ) : boolean Write data to cache.
tmp ( ) : string Get a usable temp directory

Méthodes protégées

Méthode Description
_log ( string $msg ) : null Send message to the Minify logger

Method Details

__construct() public méthode

public __construct ( string $path = '', boolean $fileLocking = false, Psr\Log\LoggerInterface $logger = null )
$path string
$fileLocking boolean
$logger Psr\Log\LoggerInterface

_log() protected méthode

Send message to the Minify logger
Deprecation: Use $this->logger
protected _log ( string $msg ) : null
$msg string
Résultat null

display() public méthode

Send the cached content to output
public display ( string $id )
$id string cache id (e.g. a filename)

fetch() public méthode

Fetch the cached content
public fetch ( string $id ) : string
$id string cache id (e.g. a filename)
Résultat string

getPath() public méthode

Fetch the cache path used
public getPath ( ) : string
Résultat string

getSize() public méthode

Get the size of a cache entry
public getSize ( string $id ) : integer
$id string cache id (e.g. a filename)
Résultat integer size in bytes

isValid() public méthode

Does a valid cache entry exist?
public isValid ( string $id, integer $srcMtime ) : boolean
$id string cache id (e.g. a filename)
$srcMtime integer mtime of the original source file(s)
Résultat boolean exists

store() public méthode

Write data to cache.
public store ( string $id, string $data ) : boolean
$id string cache id (e.g. a filename)
$data string
Résultat boolean success

tmp() public static méthode

Get a usable temp directory
Deprecation:
public static tmp ( ) : string
Résultat string