Skip to content

Internals Package Model Service Interface IPackageService

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

package\model\service\interface\IPackageService

Framework Internals · Subsystem overview · Developer guide

Source: awt_src/classes/package/model/service/interface/IPackageService.php · Snapshot 8411f4287706.

Package metadata is persisted in awt_package. Manifest readers validate input and package services build installed models; startup executes enabled nonzero-type packages.

Imports and dependencies

use package\model\InstalledPackage;
use package\model\repository\interfaces\IPackageRepository;

IPackageService

Declaration and architectural role

interface IPackageService

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

Method index

Method Signature
__construct public function __construct( IPackageRepository $repository )
getActive public function getActive(): array
getDisabled public function getDisabled(): array
getInstalled public function getInstalled(): array
getPackageById public function getPackageById(int $id): ?InstalledPackage
enablePackage public function enablePackage(int $id): void
disablePackage public function disablePackage(int $id): void
getPackage public function getPackage(string $name): ?InstalledPackage

__construct

Source line 10

public function __construct(
        IPackageRepository $repository
    );

Parameters

Parameter Type, modifiers and default Purpose
$repository IPackageRepository $repository Operation input; the exact use, validation and propagation are shown in the implementation trace.

Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.

getActive

Source line 14

public function getActive(): array;

Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.

getDisabled

Source line 16

public function getDisabled(): array;

Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.

getInstalled

Source line 18

public function getInstalled(): array;

Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.

getPackageById

Source line 20

public function getPackageById(int $id): ?InstalledPackage;

Parameters

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

Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.

enablePackage

Source line 22

public function enablePackage(int $id): void;

Parameters

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

Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.

disablePackage

Source line 24

public function disablePackage(int $id): void;

Parameters

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

Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.

getPackage

Source line 26

public function getPackage(string $name): ?InstalledPackage;

Parameters

Parameter Type, modifiers and default Purpose
$name string $name Named key/label selected by this API; its exact scope is shown by the implementation trace.

Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.

Related types

Clone this wiki locally