Skip to content

Internals Installer Events PackageInstalledEvent

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

installer\events\PackageInstalledEvent

Framework Internals · Subsystem overview · Developer guide

Source: awt_src/classes/installer/events/PackageInstalledEvent.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.

Imports and dependencies

use event\interfaces\IEvent;
use package\model\Package;

PackageInstalledEvent

Declaration and architectural role

class PackageInstalledEvent implements IEvent

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
$manifest private array $manifest; Used by setManifest(), bundle().
$id private ?int $id = null; Used by setId(), bundle().

Method index

Method Signature
setManifest public function setManifest(array $manifest)
setId public function setId(int $id)
getName public function getName(): string
bundle public function bundle(): array

setManifest

Source line 28

public function setManifest(array $manifest)

Parameters

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 setManifest(array $manifest)
    {
        $this->manifest = $manifest;
    }

setId

Source line 33

public function setId(int $id)

Parameters

Parameter Type, modifiers and default Purpose
$id int $id Record or runtime identifier selected by this operation.

State writes: $this->id.

Implementation, validation guards and interaction order
public function setId(int $id)
    {
        $this->id = $id;
    }

getName

Source line 41

public function getName(): string

Return expressions (including local callbacks): "package.installed".

Implementation, validation guards and interaction order
/**
     * @inheritDoc
     */
    public function getName(): string
    {
        return "package.installed";
    }

bundle

Source line 49

public function bundle(): array

Return expressions (including local callbacks): [ "manifest" => $this->manifest, "id" => $this->id ].

Implementation, validation guards and interaction order
/**
     * @inheritDoc
     */
    public function bundle(): array
    {
        return [
            "manifest" => $this->manifest,
            "id" => $this->id
        ];
    }

Related types

Clone this wiki locally