Repository navigation
Internals Cli Commands PackageManager Install
Framework Internals · Subsystem overview · Developer guide
Source: awt_src/classes/cli/commands/PackageManager/Install.php · Snapshot 8411f4287706.
The CLI registers command objects and executes one command, then returns to a readline loop. Help and clear have special handling in the loop.
use installer\package\Extractor;
use installer\package\PackageInstaller;
use installer\package\PackageMover;
use installer\package\PackageStorageTreeGenerator;
use JsonException;
use package\manifest\exceptions\ManifestReaderException;
use package\model\repository\PackageRepository;
use vfs\storage\services\LocalFileSystemService;
use vfs\storage\StorageRepository;
use vfs\transient\TransientStorageEntry;
use ZipArchive;readonly class InstallDeclarations 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 string $packagePath |
Initialized from the constructor argument; default expression is evaluated when the argument is omitted. |
| Method | Signature |
|---|---|
| __construct | public function __construct( private string $packagePath ) |
| install | public function install(): void |
public function __construct(
private string $packagePath
);| Parameter | Type, modifiers and default | Purpose |
|---|---|---|
$packagePath |
private string $packagePath |
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 install(): void@throws ManifestReaderException @throws JsonException
Computes or delegates the operation shown below; no explicit receiver property assignment or throw occurs in this method.
Implementation, validation guards and interaction order
/**
* @throws ManifestReaderException
* @throws JsonException
*/
public function install(): void
{
$temp = TEMP . 'installer';
$entry = new TransientStorageEntry("target", $this->packagePath);
$extractor = new Extractor(new ZipArchive(), $entry, $temp);
$mover = new PackageMover($temp, PACKAGES);
$treeGenerator = new PackageStorageTreeGenerator(
new LocalFileSystemService(),
new StorageRepository()
);
$repo = new PackageRepository();
$packageInstaller = new PackageInstaller(
$extractor,
$mover,
$treeGenerator,
$repo
);
$packageInstaller->install();
}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