BFile
\Bitrix\Main\Engine\Response\BFile - methods for handling files. You can sufficiently use \Bitrix\Main\Engine\Response\BFile when you need to pass file, stored in b_file for download.
Methods
Method | Description | Available from version |
---|---|---|
__construct( array $file, $name = null) | Constructs BFile object, by using previously generated $file. Parameters:
| |
createByFileData( array $file, $name = null ) | Creates BFile object, by using previously generated $file. Parameters
| |
createByFileId( $fileId, $name = null ) | Creates BFile object, by using $fileId. The $fileId value is used for searching records in the table b_file by ID. Parameters:
| |
createByFileId( $fileId, $name = null ) | Creates BFile object, by using $fileId. The $fileId value is used for searching record in the b_file table by ID. Parameters:
| |
getPath( ) | Getting absolute path to file. | |
setPath( $path ) | Setting absolute path to file. Parameters:
| |
getName( ) | Getting file name. | |
setName( $name ) | Getting file name. Parameters:
| |
getContentType( ) | Getting this file content-type. By default, sourced from table b_file. | |
setContentType( $contentType ) | Sets this file content-type. Parameters:
| |
showInline( $enabled ) | Parameters:
| |
setCacheTime( $cacheTime ) | Sets caching time. Parameters:
| |
getCacheTime( ) | Returns set file caching time. |
© «Bitrix24», 2001-2024