/home/techb158/ileadtechnology.com/vendor/ankitpokhrel/tus-php/src
NameSizeModeActions
Cache/-0755rm
Commands/-0755rm
Config/-0755rm
Events/-0755rm
Exception/-0755rm
Middleware/-0755rm
Tus/-0755rm
Config.php17110644editdlrm
File.php116820644editdlrm
Request.php53310644editdlrm
Response.php29560644editdlrm
Edit: /home/techb158/ileadtechnology.com/vendor/ankitpokhrel/tus-php/src/Response.php (2956B)
createOnly = $state; return $this; } /** * Set headers. * * @param array $headers * * @return Response */ public function setHeaders(array $headers): self { $this->headers += $headers; return $this; } /** * Replace headers. * * @param array $headers * * @return Response */ public function replaceHeaders(array $headers): self { $this->headers = $headers; return $this; } /** * Get global headers. * * @return array */ public function getHeaders(): array { return $this->headers; } /** * Get create only. * * @return bool */ public function getCreateOnly(): bool { return $this->createOnly; } /** * Create and send a response. * * @param mixed $content Response data. * @param int $status Http status code. * @param array $headers Headers. * * @return HttpResponse */ public function send($content, int $status = HttpResponse::HTTP_OK, array $headers = []): HttpResponse { $headers = array_merge($this->headers, $headers); if (\is_array($content)) { $content = json_encode($content); } $response = new HttpResponse($content, $status, $headers); return $this->createOnly ? $response : $response->send(); } /** * Create a new file download response. * * @param \SplFileInfo|string $file * @param string|null $name * @param array $headers * @param string|null $disposition * * @return BinaryFileResponse */ public function download( $file, string $name = null, array $headers = [], string $disposition = ResponseHeaderBag::DISPOSITION_ATTACHMENT ): BinaryFileResponse { $response = new BinaryFileResponse($file, HttpResponse::HTTP_OK, $headers, true, $disposition); $response->prepare(HttpRequest::createFromGlobals()); if ($name !== null) { $response = $response->setContentDisposition( $disposition, $name ); } return $this->createOnly ? $response : $response->send(); } }