src/CssController.php
public function css(Parameters $parameters, Config $config)
    {
        $collection = $parameters->get("collection");



        if (!isset($config->assets->css->collections[$collection])) {
            throw new RouteNotFoundException();
        }



        $file = $config->assets->css->collections[$collection];



        $cssFileName = Less_Cache::Get(
            [
                $file => $config->url->baseUri,
            ],
            [
                "cache_dir" => $config->assets->css->cacheDir,
            ]
        );

        $content = file_get_contents(
            $config->assets->css->cacheDir . "/" . $cssFileName
        );



        return new Response(
            $content,
            Response::HTTP_OK,
            [
                "Content-Type" => "text/css",
            ]
        );
    }
public function css(Parameters $parameters, Config $config)
    {
        $collection = $parameters->get("collection");



        if (!isset($config->assets->css->collections[$collection])) {
            throw new RouteNotFoundException();
        }



        $file = $config->assets->css->collections[$collection];



        $cssFileName = Less_Cache::Get(
            [
                $file => $config->url->baseUri,
            ],
            [
                "cache_dir" => $config->assets->css->cacheDir,
            ]
        );

        $content = file_get_contents(
            $config->assets->css->cacheDir . "/" . $cssFileName
        );



        return new Response(
            $content,
            Response::HTTP_OK,
            [
                "Content-Type" => "text/css",
            ]
        );
    }
@Uri("/css/{collection}")

@Requirements(
"collection"="[a-z0-9\-]+"
)