Loader final class
Minn\Extension\Loader · public/minn/src/Minn/Extension/Loader.php · 129 lines
Finds extensions under wp-content/plugins and wp-content/mu-plugins, decides which are active, autoloads them, and asks each to register. An extension that throws is logged and skipped; the page still renders.
Constants and properties
| private | array $found | |
| private | array $active | |
| private | readonly string $contentDir | Promoted from the constructor. |
| private | readonly Minn\Content\Site $site | Promoted from the constructor. |
Public
| new | __construct(string $contentDir, Minn\Content\Site $site)# | |
| method | found(): array# | Every extension manifest on disk. @return list<Manifest> every extension on disk |
| method | refresh(): void# | Forgets the cached activation list after an option write. |
| method | active(): array# | The manifests that are active. @return list<Manifest> the extensions this site has switched on |
| method | declaredTypes(): array# | Extra post types declared by active extensions, keyed by slug. @return array<string, array<string, mixed>> |
| method | replacements(): array# | Which active WordPress plugin files an extension stands in for. @return array<string, string> plugin file => extension slug @return array<string, string> plugin file => extension slug |
| method | register(Minn\Extension\Seams $seams): void# | Registers every active extension, each on seams of its own; one that throws adds nothing. |
Internals 1
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
| private | autoload(Minn\Extension\Manifest $manifest): void# |
Nothing matches.