final class SnapshotCache

Stores a verified source document as its pinned local snapshot.

The document is written to a temporary file beside the snapshot and renamed into place, so a snapshot is never left half written.

Methods§

public function write(string $path, string $content): void

Writes a snapshot, creating its directory.

Parameters

$pathstringThe absolute snapshot path
$contentstringThe verified document

Throws

RuntimeException When the directory, the temporary file or the snapshot cannot be written
Test cases 4
Called from 1
Calls 9

Test cases 5§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 4
Other tests reaching this symbol 1

Relations§

Instantiated in 1
Method calls 1