PHP Класс JBZoo\Utils\Http

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
download ( string $filename ) : boolean Transmit headers that force a browser to display the download file dialog.
getHeaders ( ) : array Get all HTTP headers
nocache ( ) : boolean Sets the headers to prevent caching for the different browsers.
utf8 ( string $content_type = 'text/html' ) : boolean Transmit UTF-8 content headers if the headers haven't already been sent.

Описание методов

download() публичный статический Метод

Cross browser compatible. Only fires if headers have not already been sent.
public static download ( string $filename ) : boolean
$filename string The name of the filename to display to browsers
Результат boolean

getHeaders() публичный статический Метод

Get all HTTP headers
См. также: https://github.com/symfony/http-foundation/blob/master/ServerBag.php
public static getHeaders ( ) : array
Результат array

nocache() публичный статический Метод

Different browsers support different nocache headers, so several headers must be sent so that all of them get the point that no caching should occur
public static nocache ( ) : boolean
Результат boolean

utf8() публичный статический Метод

Transmit UTF-8 content headers if the headers haven't already been sent.
public static utf8 ( string $content_type = 'text/html' ) : boolean
$content_type string The content type to send out
Результат boolean