PHP Trait eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\DriverHelper

Show file Open project: ezsystems/ezpublish-kernel

Public Methods

Method Description
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.

Protected Methods

Method Description
makeAuthentication ( $username, string $password, string $type ) : string Make/Crypt the authentication value.

Method Details

getHeader() public method

Get response header.
public getHeader ( string $header ) : string
$header string Header to fetch
return string Header value, or a list if its more than one

makeAuthentication() protected method

Make/Crypt the authentication value.
protected makeAuthentication ( $username, string $password, string $type ) : string
$password string
$type string The type of authentication
return string Authentication value

setAuthentication() public method

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

setHeaders() public method

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)