method public

File::getContentType()

Класс: \Bitrix\Main\Engine\Response\File

Сигнатура

public getContentType() : string

Возвращаемое значение

string

Как применяется в File

File::getContentType() — метод класса \Bitrix\Main\Engine\Response\File модуля «Главный модуль».

Метод объекта: сначала нужен экземпляр File.

use Bitrix\Main\Engine\Response\File;

/** @var File $object */
$result = $object->getContentType();
// $result: string

Другие методы File

getContentType() есть и у других классов модуля «Главный модуль»: BFile, File, HttpClient, HttpHeaders, ResizedImage.

Исходный файл: source/main/lib/engine/response/file.php:80

Что будем искать? Например,Продвижение