Module - viames/pair GitHub Wiki
Pair framework: Module
Pair\Models\Module represents an installable module package record.
Main methods
getPackageBaseFolder(): stringgetInstallablePackage(): InstallablePackagestoreFromPackageManifest(SimpleXMLElement $options): bool
Lifecycle hooks:
_init()defines schema and validationbeforeDelete()performs module cleanup
Implementation example
$module = \Pair\Models\Module::findById($id);
if ($module && $module->isCompatibleWithApp()) {
$package = $module->getInstallablePackage();
// use package metadata or download helpers
}
Notes
- Extends
InstallablePackageRecord, so it inherits compatibility checks. - Integrates with package manifest options when storing.
See also: InstallablePackage, InstallablePackageRecord, Template.