Skip to content

Internals Cli Commands PackageManager Manage

Stefan Crkvenjakov edited this page Oct 7, 2026 · 1 revision

cli\commands\PackageManager\Manage

Framework Internals · Subsystem overview · Developer guide

Source: awt_src/classes/cli/commands/PackageManager/Manage.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.

Imports and dependencies

use package\model\repository\interfaces\IPackageRepository;

Manage

Declaration and architectural role

readonly class Manage

Constants, enum cases, traits and properties

Declarations 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 IPackageRepository $packageRepository Initialized from the constructor argument; default expression is evaluated when the argument is omitted.
Constructor-promoted private int $packageId Initialized from the constructor argument; default expression is evaluated when the argument is omitted.

Method index

Method Signature
__construct public function __construct( private IPackageRepository $packageRepository, private int $packageId )

__construct

Source line 9

public function __construct(
        private IPackageRepository $packageRepository,
        private int $packageId
    );

Parameters

Parameter Type, modifiers and default Purpose
$packageRepository private IPackageRepository $packageRepository Operation input; the exact use, validation and propagation are shown in the implementation trace.
$packageId private int $packageId Installed package ID used for metadata/schema/storage ownership.

Concrete no-op/default hook: this method performs no work. Override it where the lifecycle or extension contract calls for behavior.

Related types

Clone this wiki locally