PHP Класс Psr7Middlewares\Utils\Helpers

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

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

Метод Описание
fixPath ( string $path ) : string helper function to fix paths '//' or '/./' or '/foo/.
getMimeType ( Psr\Http\Message\ResponseInterface $response ) : string Return the mime type.
getOutput ( integer $level ) : string Return the output buffer.
hashEquals ( string $a, string $b ) : boolean Very short timing attack safe string comparison for PHP < 5.6 http://php.net/manual/en/function.hash-equals.php#118384.
isAjax ( Psr\Http\Message\RequestInterface $request ) : boolean Check whether a request is or not ajax.
isPost ( Psr\Http\Message\RequestInterface $request ) : boolean Check if a request is post or any similar method.
isRedirect ( Psr\Http\Message\ResponseInterface $response ) : boolean Check whether a response is a redirection.
joinPath ( ) : string Join several pieces into a path.

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

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

./' in a path.
public static fixPath ( string $path ) : string
$path string Path to resolve
Результат string

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

Return the mime type.
public static getMimeType ( Psr\Http\Message\ResponseInterface $response ) : string
$response Psr\Http\Message\ResponseInterface
Результат string

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

Return the output buffer.
public static getOutput ( integer $level ) : string
$level integer
Результат string

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

Very short timing attack safe string comparison for PHP < 5.6 http://php.net/manual/en/function.hash-equals.php#118384.
public static hashEquals ( string $a, string $b ) : boolean
$a string
$b string
Результат boolean

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

Check whether a request is or not ajax.
public static isAjax ( Psr\Http\Message\RequestInterface $request ) : boolean
$request Psr\Http\Message\RequestInterface
Результат boolean

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

Check if a request is post or any similar method.
public static isPost ( Psr\Http\Message\RequestInterface $request ) : boolean
$request Psr\Http\Message\RequestInterface
Результат boolean

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

Check whether a response is a redirection.
public static isRedirect ( Psr\Http\Message\ResponseInterface $response ) : boolean
$response Psr\Http\Message\ResponseInterface
Результат boolean

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

Join several pieces into a path.
public static joinPath ( ) : string
Результат string