EmbeddedPackageReplacer
in package
FinalYes
Stages and transactionally activates exactly one embedded package.
The old destination is retained as a sibling backup until the caller has committed its manifest. Source links are rejected, and removal handles links as nodes without following them, including Windows junctions.
Table of Contents
Methods
- __construct() : mixed
- abort() : void
- activate() : string
- Moves the prepared package into place while retaining the old destination.
- finalize() : void
- Permanently removes the retained destination after the manifest commits.
- prepare() : string
- Stages a validated package without changing its final destination.
- replace() : string
- Convenience API for callers that do not need to coordinate another file.
- rollback() : void
- Restores the old destination and removes all staging created by this run.
Methods
__construct()
public
__construct([WorkspaceClassifier|null $workspaceClassifier = null ][, PackageMetadataReaderInterface|null $metadataReader = null ]) : mixed
Parameters
- $workspaceClassifier : WorkspaceClassifier|null = null
- $metadataReader : PackageMetadataReaderInterface|null = null
abort()
public
abort() : void
activate()
Moves the prepared package into place while retaining the old destination.
public
activate() : string
Return values
stringfinalize()
Permanently removes the retained destination after the manifest commits.
public
finalize() : void
prepare()
Stages a validated package without changing its final destination.
public
prepare(string $workspacePath, string $sourcePackagePath) : string
Parameters
- $workspacePath : string
- $sourcePackagePath : string
Return values
string —Canonical destination path inside WORKSPACE/Packages.
replace()
Convenience API for callers that do not need to coordinate another file.
public
replace(string $workspacePath, string $sourcePackagePath) : string
Parameters
- $workspacePath : string
- $sourcePackagePath : string
Return values
stringrollback()
Restores the old destination and removes all staging created by this run.
public
rollback() : void