Repository navigation
Internals Installer Package PrepareInstallation
Framework Internals · Subsystem overview · Developer guide
Source: awt_src/classes/installer/package/PrepareInstallation.php · Snapshot 8411f4287706.
Installation validates archives and manifests, moves files, persists metadata, copies data into storage, invokes an optional hook and emits an event. These operations do not form one atomic transaction.
use installer\interfaces\package\IPrepareInstallation;
use installer\interfaces\package\IVerifyManifest;
use installer\interfaces\package\IVerifyStructure;readonly class PrepareInstallation implements IPrepareInstallationDeclarations below preserve visibility, type, default and modifiers exactly. A typed property without an initializer remains uninitialized until its constructor or another method assigns it. Mutable fields belong to this instance unless marked static; readonly fields can be initialized once. Constructor-promoted properties are also listed below.
| Member | Declaration | Purpose or source contract |
|---|---|---|
| Constructor-promoted | private IVerifyManifest $manifestVerifier |
Initialized from the constructor argument; default expression is evaluated when the argument is omitted. |
| Constructor-promoted | private IVerifyStructure $structureVerifier |
Initialized from the constructor argument; default expression is evaluated when the argument is omitted. |
| Method | Signature |
|---|---|
| __construct | public function __construct( private IVerifyManifest $manifestVerifier, private IVerifyStructure $structureVerifier, ) |
| prepare | public function prepare(): IPrepareInstallation |
| verify | public function verify(): bool |
public function __construct(
private IVerifyManifest $manifestVerifier,
private IVerifyStructure $structureVerifier,
);| Parameter | Type, modifiers and default | Purpose |
|---|---|---|
$manifestVerifier |
private IVerifyManifest $manifestVerifier |
Operation input; the exact use, validation and propagation are shown in the implementation trace. |
$structureVerifier |
private IVerifyStructure $structureVerifier |
Operation input; the exact use, validation and propagation are shown in the implementation trace. |
Concrete no-op/default hook: this method performs no work. Override it where the lifecycle or extension contract calls for behavior.
public function prepare(): IPrepareInstallationReturn expressions (including local callbacks): $this.
Implementation, validation guards and interaction order
/**
* @inheritDoc
*/
public function prepare(): IPrepareInstallation
{
$this->manifestVerifier
->addKey("name")
->addKey("version")
->addKey("type")
->addKey("minimum_awt_version");
$this->structureVerifier
->addFile("main.php");
return $this;
}public function verify(): boolReturn expressions (including local callbacks): false; $this->manifestVerifier->verify().
Implementation, validation guards and interaction order
/**
* @inheritDoc
*/
public function verify(): bool
{
$res = $this->structureVerifier->verify();
if (!$res) {
return false;
}
return $this->manifestVerifier->verify();
}AWT Framework Wiki · Home · Installation Guide · Developer Guide · Framework Internals
Philosophy · Architecture · Known discrepancies · Verification
Installation Guide
Developer Guide
- Learning sequence
- First package
- Package structure
- Lifecycle
- Runtimes
- Events and objects
- Routing and controllers
- Views and resources
- Database and models
- Storage and caching
- Configuration and CLI
- Responses and errors
- Extension points
Framework Internals
- Architecture
- Bootstrap
- Packages
- Runtime
- Events and context
- Objects
- HTTP routing and controllers
- Rendering
- Blade integration
- Database
- Models
- Storage and caching
- Settings
- CLI
- Identity and sessions
- Responses
- Errors
- Complete source inventory
Documentation notes