Recca0120\LaravelTracy\Middleware\Dispatch::dispatchAssets PHP Метод

dispatchAssets() защищенный Метод

dispatchAssets.
protected dispatchAssets ( Illuminate\Http\Request $request, Closure $next ) : Response
$request Illuminate\Http\Request
$next Closure
Результат Symfony\Component\HttpFoundation\Response
    protected function dispatchAssets($request, $next)
    {
        $assets = $request->get('_tracy_bar');
        switch ($assets) {
            case 'css':
                $content = $this->debugbar->dispatchAssets();
                $headers = ['content-type' => 'text/css; charset=utf-8', 'cache-control' => 'max-age=86400'];
                break;
            case 'js':
            case 'assets':
                $content = $this->debugbar->dispatchAssets();
                $headers = ['content-type' => 'text/javascript; charset=utf-8', 'cache-control' => 'max-age=86400'];
                break;
            default:
                $this->storeWrapper->start();
                $this->storeWrapper->restore();
                $content = $this->debugbar->dispatchContent();
                $headers = ['content-type' => 'text/javascript; charset=utf-8'];
                $this->storeWrapper->clean($assets)->close();
                break;
        }
        return $this->responseFactory->make($content, 200, array_merge($headers, ['content-length' => strlen($content)]));
    }