Repository navigation
InstallablePackage
Viames Marino edited this page Apr 28, 2026
·
2 revisions
Pair\Packages\InstallablePackage manages ZIP package lifecycle: manifest creation, archive download, archive validation, file installation, and package record creation.
The official name for this extension style is Installable Package.
This is the ZIP/manifest package installer surface. Runtime Extensions should use RuntimeExtensionInterface and explicit registration instead.
Use InstallablePackage when installing or downloading module, template, provider, or custom packages that follow Pair manifest conventions.
installArchive(string $archivePath): booldownloadArchive(): voidwriteManifestFile(): bool-
__get(...),__set(...)for package metadata access
$package = new \Pair\Packages\InstallablePackage();
if (!$package->installArchive('my-module.zip')) {
throw new \RuntimeException('Package installation failed');
}$package = new \Pair\Packages\InstallablePackage();
$package->name = 'my-module';
$package->version = '1.2.0';
$package->downloadArchive();
$ok = $package->installArchive('my-module-1.2.0.zip');$package = new \Pair\Packages\InstallablePackage(
'Module',
'customer-portal',
'1.2.0',
'2026-04-23',
'4.0',
APPLICATION_PATH . '/modules/customer-portal'
);
if (!$package->writeManifestFile()) {
throw new \RuntimeException('Package manifest could not be written.');
}- Invalid manifest structure leads to partial installation.
- Version compatibility should be checked before activation.
See also: RuntimeExtensionInterface, AdapterRegistry, InstallablePackageRecord, Module, Template.
Home · Setup · Configuration
Build with Pair 4
- Generator
- Controllers and responses
- Read models
- ActiveRecord and queries
- Forms and validation
- PairUI.js and HTML fragments
APIs and authentication
- API guide and CRUD
- Middleware and rate limits
- Users, sessions, and ACL
- Passkeys and social login
- Native mobile setup
Integrate and operate
- Integrations
- Runtime extensions and adapter keys
- Cache and cache stores
- Logs and observability
- PWA and push
- Packages and distribution
- Upgrade to v4