class FileVersioner implements VersionerInterface

Constants

REV_MANIFEST

Methods

__construct(Filesystem $filesystem)

No description

void
putRevision(string $file, string|null $revision)

Record the current revision of a file, or forget it when null.

void
deferWrites()

No-ops: every write here already rewrites the whole manifest, so there is nothing for a batch to save.

void
flushWrites()

Store anything {deferWrites()} collected, and stop deferring.

string|null
getRevision(string $file)

The recorded revision, or null when there is none.

array
allRevisions()

Every recorded revision, keyed by file.

Details

__construct(Filesystem $filesystem)

Parameters

Filesystem $filesystem

void putRevision(string $file, string|null $revision)

Record the current revision of a file, or forget it when null.

Parameters

string $file
string|null $revision

Return Value

void

void deferWrites()

No-ops: every write here already rewrites the whole manifest, so there is nothing for a batch to save.

Return Value

void

void flushWrites()

Store anything {deferWrites()} collected, and stop deferring.

Safe to call when nothing was deferred.

Return Value

void

string|null getRevision(string $file)

The recorded revision, or null when there is none.

Parameters

string $file

Return Value

string|null

array allRevisions()

Every recorded revision, keyed by file.

Return Value

array