-
Notifications
You must be signed in to change notification settings - Fork 2
Plugin
Viames Marino edited this page Feb 23, 2026
·
1 revision
Pair\Helpers\Plugin manages plugin package lifecycle: download, extract, parse, and install.
Use Plugin when installing/updating module/template packages that follow Pair plugin manifest conventions.
installPackage(string $package): booldownloadPackage(): voidcreateManifestFile(): bool-
__get(...),__set(...)for plugin metadata access
$plugin = new \Pair\Helpers\Plugin();
if (!$plugin->installPackage('my-module.zip')) {
throw new RuntimeException('Plugin installation failed');
}$plugin = new \Pair\Helpers\Plugin();
$plugin->name = 'my-module';
$plugin->version = '1.2.0';
$plugin->downloadPackage();
$ok = $plugin->installPackage('my-module-1.2.0.zip');- Invalid manifest structure leads to partial installation.
- Version compatibility should be checked before activation.
See also: PluginBase, Module, Template.