Files
nette-vite/app/Latte/AssetFilter.php
2022-02-15 07:33:00 +01:00

22 lines
338 B
PHP
Executable File

<?php
namespace App\Latte;
use Nette\Utils\JsonException;
use Vite;
class AssetFilter
{
public function __construct(
private Vite $vite,
) {}
/**
* @throws JsonException
*/
public function __invoke(string $path): string
{
return $this->vite->getAsset($path);
}
}