Repository navigation
Internals Installer Package VerifyManifest
Framework Internals · Subsystem overview · Developer guide
Source: awt_src/classes/installer/package/VerifyManifest.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\IVerifyManifest;
use RuntimeException;class VerifyManifest implements IVerifyManifestDeclarations 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 |
|---|---|---|
| $manifest | private array $manifest; |
Used by __construct(), verify(). |
| $verificationList | private array $verificationList = []; |
Used by addKey(), addKeyWithType(), verify(). |
| Constructor-promoted | public function __construct(array $manifest) |
Initialized from the constructor argument; default expression is evaluated when the argument is omitted. |
| Method | Signature |
|---|---|
| __construct | public function __construct(array $manifest) |
| addKey | public function addKey(string $key): IVerifyManifest |
| addKeyWithType | public function addKeyWithType(string $key, string $type): IVerifyManifest |
| verify | public function verify(): bool |
public function __construct(array $manifest)| Parameter | Type, modifiers and default | Purpose |
|---|---|---|
$manifest |
array $manifest |
Operation input; the exact use, validation and propagation are shown in the implementation trace. |
State writes: $this->manifest.
Implementation, validation guards and interaction order
public function __construct(array $manifest)
{
$this->manifest = $manifest;
}public function addKey(string $key): IVerifyManifest| Parameter | Type, modifiers and default | Purpose |
|---|---|---|
$key |
string $key |
Operation input; the exact use, validation and propagation are shown in the implementation trace. |
State writes: $this->verificationList[$key].
Return expressions (including local callbacks): $this.
Implementation, validation guards and interaction order
/**
* @inheritDoc
*/
public function addKey(string $key): IVerifyManifest
{
$this->verificationList[$key] = "*";
return $this;
}public function addKeyWithType(string $key, string $type): IVerifyManifest| Parameter | Type, modifiers and default | Purpose |
|---|---|---|
$key |
string $key |
Operation input; the exact use, validation and propagation are shown in the implementation trace. |
$type |
string $type |
Expected class/type or enum selection according to the signature. |
State writes: $this->verificationList[$key].
Return expressions (including local callbacks): $this.
Implementation, validation guards and interaction order
/**
* @inheritDoc
*/
public function addKeyWithType(string $key, string $type): IVerifyManifest
{
$this->verificationList[$key] = $type;
return $this;
}public function verify(): boolReturn expressions (including local callbacks): true.
Explicit exceptions: RuntimeException. The guards in the implementation below show when each is raised; exceptions from collaborators also propagate unless caught.
Implementation, validation guards and interaction order
/**
* @inheritDoc
*/
public function verify(): bool
{
foreach ($this->verificationList as $key => $type) {
if (!array_key_exists($key, $this->manifest)) {
throw new RuntimeException("Manifest key not found: {$key}");
}
if ($type === '*') {
continue;
}
$normalized = match ($type) {
'bool' => 'boolean',
'int' => 'integer',
'float' => 'double',
default => $type,
};
if (gettype($this->manifest[$key]) !== $normalized) {
throw new RuntimeException("Manifest key type mismatch: {$key} expected {$type}, got " . gettype($this->manifest[$key]));
}
}
return true;
}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