Documentation

LocalResponse
in package

Local response loaded from a file.

Table of Contents

Properties

$file  : mixed

Methods

__construct()  : mixed
getHMACSignature()  : string
isValidHMACSignature()  : bool
toArray()  : array<string|int, mixed>

Properties

$file

private mixed $file

File object of the local response.

Methods

__construct()

public __construct(mixed $inputFile) : mixed
Parameters
$inputFile : mixed

A string, path or file-like object to load as a local response.

Tags
throws
MindeeException

Throws if the input file isn't acceptable.

getHMACSignature()

public getHMACSignature(string $secretKey) : string
Parameters
$secretKey : string

Secret key as a string.

Tags
throws
MindeeException

Throws when either the file is unreadable, or when the secret is invalid.

Return values
string

a valid HMAC signature

isValidHMACSignature()

public isValidHMACSignature(string $secretKey, string $signature) : bool
Parameters
$secretKey : string

Secret, given key as a string.

$signature : string

HMAC signature as a string.

Return values
bool

toArray()

public toArray() : array<string|int, mixed>
Tags
throws
MindeeException

Throws if the file contents cannot be converted to a valid array.

Return values
array<string|int, mixed>

        
On this page

Search results