Contracts
PluginContract
v1.0.0Base identity contract for any registerable Meteorack plugin or module.
Namespace
use Meteorack\Sdk\Core\Contracts\PluginContract;How To Use It
- Treat it as the minimum identity surface every registerable Meteorack plugin or module exposes to the runtime.
- When you extend AbstractModule you already satisfy most of this contract, so override the metadata methods only when you need non-default description, icon, or SDK compatibility values.
Works Well With
Methods
public function getSlug(): stringReturns the stable runtime slug for the module or plugin.
public function getName(): stringReturns the human-readable display name.
public function getVersion(): stringReturns the current semantic version.
public function getMinSdk(): stringDeclares the minimum supported Meteorack SDK version.
public function getMaxTestedSdk(): stringDeclares the latest SDK version this module has been tested against.
public function getDescription(): stringReturns the long-form module description used in listings and metadata views.
public function getIconUrl(): stringReturns the icon URL shown in admin or marketplace surfaces.
Example
bootstrap.php
<?php
declare(strict_types=1);
use Meteorack\Sdk\RuntimeWp\AbstractModule;
class ReportsModule extends AbstractModule
{
public function getSlug(): string { return 'reports'; }
public function getName(): string { return 'Reports'; }
public function getVersion(): string { return '1.2.0'; }
public function getMinSdk(): string { return '1.0.0'; }
public function getMaxTestedSdk(): string { return '1.0.0'; }
public function getDescription(): string { return 'Operational reporting tools.'; }
public function getIconUrl(): string { return content_url('meteorack/modules/reports/icon.svg'); }
}
return new ReportsModule();