AssetsController final readonly class
Minn\Front\AssetsController · public/minn/src/Minn/Front/AssetsController.php · 42 lines
The engine's own static assets, served under a reserved path.
Constants and properties
| private | TYPES = array ( 'css' => 'text/css', 'js' => 'application/javascript', ) | |
| private | EMBED_SCRIPTS = array ( 'wp-embed.min.js' => 'embed-host.js', 'wp-embed-template.min.js' => 'embed-card.js', ) | The embed scripts, by the reference addresses a page and a card's sourceURL name them at. |
| private | readonly string $assetsDir | Promoted from the constructor. |
Public
| new | __construct(string $assetsDir)# | |
| method | asset(Minn\Http\Request $request, string $path): Minn\Http\ResponseGET /minn/assets/{path*} (public)# | One engine asset file. |
| method | embedScript(Minn\Http\Request $request, string $file): Minn\Http\ResponseGET /wp-includes/js/{file:wp-embed(?:-template)?\.min\.js} (public)# | The engine's embed scripts at the addresses the reference serves its own from. |
| method | jquery(Minn\Http\Request $request, string $file): Minn\Http\ResponseGET /wp-includes/js/jquery/{file:[a-z0-9.-]+\.js} (public)# | The MIT libraries the engine ships, served at the paths the reference registers them under. |
Nothing matches.