api/symfony/Component/HttpFoundation/BinaryFileResponse.yaml
2024-09-26 02:03:21 -07:00

175 lines
5 KiB
YAML

name: BinaryFileResponse
class_comment: '# * BinaryFileResponse represents an HTTP response delivering a file.
# *
# * @author Niklas Fiekas <niklas.fiekas@tu-clausthal.de>
# * @author stealth35 <stealth35-php@live.fr>
# * @author Igor Wiedler <igor@wiedler.ch>
# * @author Jordan Alliot <jordan.alliot@gmail.com>
# * @author Sergey Linnik <linniksa@gmail.com>'
dependencies:
- name: FileException
type: class
source: Symfony\Component\HttpFoundation\File\Exception\FileException
- name: File
type: class
source: Symfony\Component\HttpFoundation\File\File
properties: []
methods:
- name: __construct
visibility: public
parameters:
- name: file
- name: status
default: '200'
- name: headers
default: '[]'
- name: public
default: 'true'
- name: contentDisposition
default: 'null'
- name: autoEtag
default: 'false'
- name: autoLastModified
default: 'true'
comment: "# * BinaryFileResponse represents an HTTP response delivering a file.\n\
# *\n# * @author Niklas Fiekas <niklas.fiekas@tu-clausthal.de>\n# * @author stealth35\
\ <stealth35-php@live.fr>\n# * @author Igor Wiedler <igor@wiedler.ch>\n# * @author\
\ Jordan Alliot <jordan.alliot@gmail.com>\n# * @author Sergey Linnik <linniksa@gmail.com>\n\
# */\n# class BinaryFileResponse extends Response\n# {\n# protected static bool\
\ $trustXSendfileTypeHeader = false;\n# \n# protected File $file;\n# protected\
\ ?\\SplTempFileObject $tempFileObject = null;\n# protected int $offset = 0;\n\
# protected int $maxlen = -1;\n# protected bool $deleteFileAfterSend = false;\n\
# protected int $chunkSize = 16 * 1024;\n# \n# /**\n# * @param \\SplFileInfo|string\
\ $file The file to stream\n# * @param int $status\
\ The response status code (200 \"OK\" by default)\n# * @param array\
\ $headers An array of response headers\n# * @param bool\
\ $public Files are public by default\n# * @param string|null\
\ $contentDisposition The type of Content-Disposition to set automatically\
\ with the filename\n# * @param bool $autoEtag Whether\
\ the ETag header should be automatically set\n# * @param bool \
\ $autoLastModified Whether the Last-Modified header should be automatically\
\ set"
- name: setFile
visibility: public
parameters:
- name: file
- name: contentDisposition
default: 'null'
- name: autoEtag
default: 'false'
- name: autoLastModified
default: 'true'
comment: '# * Sets the file to stream.
# *
# * @return $this
# *
# * @throws FileException'
- name: getFile
visibility: public
parameters: []
comment: '# * Gets the file.'
- name: setChunkSize
visibility: public
parameters:
- name: chunkSize
comment: '# * Sets the response stream chunk size.
# *
# * @return $this'
- name: setAutoLastModified
visibility: public
parameters: []
comment: '# * Automatically sets the Last-Modified header according the file modification
date.
# *
# * @return $this'
- name: setAutoEtag
visibility: public
parameters: []
comment: '# * Automatically sets the ETag header according to the checksum of the
file.
# *
# * @return $this'
- name: setContentDisposition
visibility: public
parameters:
- name: disposition
- name: filename
default: ''''''
- name: filenameFallback
default: ''''''
comment: '# * Sets the Content-Disposition header with the given filename.
# *
# * @param string $disposition ResponseHeaderBag::DISPOSITION_INLINE or ResponseHeaderBag::DISPOSITION_ATTACHMENT
# * @param string $filename Optionally use this UTF-8 encoded filename
instead of the real name of the file
# * @param string $filenameFallback A fallback filename, containing only ASCII
characters. Defaults to an automatically encoded filename
# *
# * @return $this'
- name: prepare
visibility: public
parameters:
- name: request
comment: null
- name: hasValidIfRangeHeader
visibility: private
parameters:
- name: header
comment: null
- name: sendContent
visibility: public
parameters: []
comment: null
- name: setContent
visibility: public
parameters:
- name: content
comment: '# * @throws \LogicException when the content is not null'
- name: getContent
visibility: public
parameters: []
comment: null
- name: trustXSendfileTypeHeader
visibility: public
parameters: []
comment: '# * Trust X-Sendfile-Type header.'
- name: deleteFileAfterSend
visibility: public
parameters:
- name: shouldDelete
default: 'true'
comment: '# * If this is set to true, the file will be unlinked after the request
is sent
# * Note: If the X-Sendfile header is used, the deleteFileAfterSend setting will
not be used.
# *
# * @return $this'
traits:
- Symfony\Component\HttpFoundation\File\Exception\FileException
- Symfony\Component\HttpFoundation\File\File
interfaces: []