$provider
$provider : \Drupal\strata\Storage\StorageProviderInterface
Loads an archive into this site's store.
Content-addressed objects are verified before they are written. A frame, a commit and an anchor are all filed under the digest of their own bytes, so an archive that was edited or truncated can be caught here rather than at the moment someone needs a restore. A key whose bytes do not hash to it is refused and recorded; the rest of the archive still imports.
An import never advances the ref. The archive's own head is reported and left alone: a site importing history from elsewhere is inspecting or merging it, and silently repointing the live ref at a foreign commit would change what the site restores to without anyone asking for it.
The local indexes are not rebuilt here either. strata:reindex does that, from the objects an
import has just put in place, and it is the same pass an uninstall-and-reinstall runs.
$provider : \Drupal\strata\Storage\StorageProviderInterface
__construct(\Drupal\strata\Storage\StorageProviderInterface $provider, \Psr\Log\LoggerInterface $logger) : mixed
Constructs an importer.
| \Drupal\strata\Storage\StorageProviderInterface | $provider | Where objects are written. |
| \Psr\Log\LoggerInterface | $logger | Records what was refused. |
inspect(string $path) : \Drupal\strata\Archive\ArchiveManifest
Reads an archive's manifest without writing anything.
| string | $path | The archive. |
When the file is not readable, is not an archive, or carries no manifest.
What the archive says it holds.
import(string $path, bool $apply = false) : \Drupal\strata\Archive\ArchiveManifest
Writes an archive's objects into the store.
| string | $path | The archive. |
| bool | $apply | FALSE to report what would be written without writing it. |
When the file is not readable, is not an archive, or carries no manifest.
What was written, with anything refused listed as a problem.
reject(string $key, string $body) : string|null
Why an object may not be written, if there is a reason.
Only content-addressed keys can be checked. A ref, a segment and a dictionary are named by position rather than by digest, so their bytes are taken as given - an archive is not a trust boundary, it is a transport, and a caller importing one they did not produce has already decided to trust it.
| string | $key | The object key. |
| string | $body | The bytes. |
The reason to refuse it, or NULL to write it.
manifest(\Drupal\Core\Archiver\ArchiveTar $archive) : \Drupal\strata\Archive\ArchiveManifest
Reads the manifest out of an archive.
| \Drupal\Core\Archiver\ArchiveTar | $archive | The open archive. |
When the manifest is absent, unreadable, or from a later format than this release knows.
The manifest.