PHP Трейт eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\DriverHelper

Показать файл Открыть проект

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

Метод Описание
getHeader ( string $header ) : string Get response header.
setAuthentication ( string $user, string $password, string $type = self::AUTH_TYPE_BASIC ) Set authentication.
setHeaders ( array $headers ) Set request headers.

Защищенные методы

Метод Описание
makeAuthentication ( $username, string $password, string $type ) : string Make/Crypt the authentication value.

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

getHeader() публичный Метод

Get response header.
public getHeader ( string $header ) : string
$header string Header to fetch
Результат string Header value, or a list if its more than one

makeAuthentication() защищенный Метод

Make/Crypt the authentication value.
protected makeAuthentication ( $username, string $password, string $type ) : string
$password string
$type string The type of authentication
Результат string Authentication value

setAuthentication() публичный Метод

Set authentication.
public setAuthentication ( string $user, string $password, string $type = self::AUTH_TYPE_BASIC )
$user string
$password string
$type string Authentication type

setHeaders() публичный Метод

Set request headers.
public setHeaders ( array $headers )
$headers array Associative array with $header => $value (value can be an array if it hasn't a single value)