App final readonly class
Minn\Admin\App · public/minn/src/Minn/Admin/App.php · 100 lines
The Minn Admin app on disk: the symlinked dev copy the engine serves the shell and assets from. Minn Admin is MIT, so reading its files is fine.
Constants and properties
| private | ASSET_TYPES = array ( 'css' => 'text/css', 'js' => 'application/javascript', 'woff2' => 'font/woff2', 'woff' => 'font/woff', 'svg' => 'image/svg+xml', 'png' => 'image/png', 'json' => 'application/json', ) | |
| private | readonly string $dir | Promoted from the constructor. |
Public
| new | __construct(string $dir)# | |
| static | switchedOff(string $contentDir, Minn\Content\Site $site): bool# | Whether the site has switched Minn Admin off: its plugin folder is in wp-content/plugins (the record the reference keeps) and active_plugins does not name it. A site that carries only the engine's bundle has no such record and keeps its admin. |
| method | dir(): string# | Where the bundle sits on disk. |
| method | installed(): bool# | Whether the bundle is on disk. |
| method | version(): string# | The bundle's version from its plugin header. |
| method | file(string $relative): ?string# | The absolute path of a readable file inside the app, or null. |
| method | assetVersion(string $relative): string# | A self-busting asset version: app version plus file mtime. |
| method | asset(string $relative): ?array# | The absolute path and content type of an asset inside the app, or null for anything missing or outside it. @return array{0: string, 1: string}|null |
Nothing matches.