Scaffold plugin: architecture contract, schema, settings, fee math
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
939193f258
12 files changed
+2081
No files matched your search
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
declare( strict_types=1 );
|
||||
|
||||
namespace StreamGoals\Core;
|
||||
|
||||
/**
|
||||
* Boots feature modules. Each module exposes a static register() that adds its own hooks;
|
||||
* classes that do not exist yet are skipped so modules can land independently.
|
||||
*/
|
||||
final class Plugin {
|
||||
|
||||
private const MODULES = array(
|
||||
\StreamGoals\Rest\DonateController::class,
|
||||
\StreamGoals\Rest\WebhookController::class,
|
||||
\StreamGoals\Rest\OverlayController::class,
|
||||
\StreamGoals\Admin\Admin::class,
|
||||
);
|
||||
|
||||
public static function boot(): void {
|
||||
Installer::maybe_upgrade();
|
||||
foreach ( self::MODULES as $module ) {
|
||||
if ( class_exists( $module ) && method_exists( $module, 'register' ) ) {
|
||||
$module::register();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user