class ModificationTimeStrategy implements ChangeDetectionStrategyInterface, StrategyWithMarkDeletedInterface (View source)

A change detection strategy based on modification times

Properties

protected FileMonitor $fileMonitor
protected StringFrontend $cache
protected array $filesAndModificationTimes
protected bool $modificationTimesChanged

If the modification times changed and therefore need to be cached

Methods

void
injectCache(StringFrontend $cache)

Injects the Flow_Monitor cache

mixed
setFileMonitor(FileMonitor $fileMonitor)

Initializes this strategy

int
getFileStatus(string $pathAndFilename)

Checks if the specified file has changed

void
setFileDeleted(string $pathAndFilename)

Notify the change strategy that this file was deleted and does not need to be tracked anymore.

void
shutdownObject()

Caches the file modification times

Details

void injectCache(StringFrontend $cache)

Injects the Flow_Monitor cache

Parameters

StringFrontend $cache

Return Value

void

mixed setFileMonitor(FileMonitor $fileMonitor)

Initializes this strategy

Parameters

FileMonitor $fileMonitor

Return Value

mixed

int getFileStatus(string $pathAndFilename)

Checks if the specified file has changed

Parameters

string $pathAndFilename

Return Value

int

One of the STATUS_* constants

void setFileDeleted(string $pathAndFilename)

Notify the change strategy that this file was deleted and does not need to be tracked anymore.

Parameters

string $pathAndFilename

Return Value

void

void shutdownObject()

Caches the file modification times

Return Value

void