PHP Class Behat\Gherkin\Cache\FileCache

Caches feature into a file.
Author: Konstantin Kudryashov ([email protected])
Inheritance: implements Behat\Gherkin\Cache\CacheInterface
Datei anzeigen Open project: behat/gherkin

Public Methods

Method Description
__construct ( string $path ) Initializes file cache.
isFresh ( string $path, integer $timestamp ) : boolean Checks that cache for feature exists and is fresh.
read ( string $path ) : Behat\Gherkin\Node\FeatureNode Reads feature cache from path.
write ( string $path, Behat\Gherkin\Node\FeatureNode $feature ) Caches feature node.

Protected Methods

Method Description
getCachePathFor ( string $path ) : string Returns feature cache file path from features path.

Method Details

__construct() public method

Initializes file cache.
public __construct ( string $path )
$path string Path to the folder where to store caches.

getCachePathFor() protected method

Returns feature cache file path from features path.
protected getCachePathFor ( string $path ) : string
$path string Feature path
return string

isFresh() public method

Checks that cache for feature exists and is fresh.
public isFresh ( string $path, integer $timestamp ) : boolean
$path string Feature path
$timestamp integer The last time feature was updated
return boolean

read() public method

Reads feature cache from path.
public read ( string $path ) : Behat\Gherkin\Node\FeatureNode
$path string Feature path
return Behat\Gherkin\Node\FeatureNode

write() public method

Caches feature node.
public write ( string $path, Behat\Gherkin\Node\FeatureNode $feature )
$path string Feature path
$feature Behat\Gherkin\Node\FeatureNode Feature instance