feat: Divi manifests, adapter register and boundary test
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace LIT\MCP\Integrations\Divi\Release;
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
/** The Divi boundary (spec §3): the only classes that touch Divi, in the order reports list them. */
|
||||
final class DiviAdapters
|
||||
{
|
||||
/** @var list<class-string<DiviAdapter>> */
|
||||
public const CLASSES = [];
|
||||
|
||||
/** @return array<class-string<DiviAdapter>, Manifest> */
|
||||
public static function manifests(): array
|
||||
{
|
||||
$manifests = [];
|
||||
foreach (self::CLASSES as $class) {
|
||||
$manifests[$class] = $class::manifest();
|
||||
}
|
||||
|
||||
return $manifests;
|
||||
}
|
||||
|
||||
/** @return list<Mirror> */
|
||||
public static function mirrors(): array
|
||||
{
|
||||
$mirrors = [];
|
||||
foreach (self::manifests() as $manifest) {
|
||||
array_push($mirrors, ...$manifest->mirrors);
|
||||
}
|
||||
|
||||
return $mirrors;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user