Explore Server Side Testing SDK for PHP

Context

Table of Contents

Properties

$params  : array<string|int, mixed>

Methods

__construct()  : mixed
Constructor
addParam()  : mixed
Add a parameter to the context
getAllParams()  : array<string|int, ContextParam>
Get all context params
getParam()  : ContextParamInterface|null
Get a parameter by its class name
getParams()  : array<string|int, ContextParamInterface>
Get all context params by type
getParamValueOrEmptyString()  : string
Get the value of a parameter by its class name, or an empty string if not set
toArray()  : array<string|int, mixed>
Get the context as an array
validate()  : mixed
Validate all parameters in the context
hasParam()  : bool
Check if a parameter exists

Properties

$params

private array<string|int, mixed> $params = array()

Methods

__construct()

Constructor

public __construct([mixed $params = array() ]) : mixed
Parameters
$params : mixed = array()

getAllParams()

Get all context params

public getAllParams() : array<string|int, ContextParam>
Return values
array<string|int, ContextParam>

getParamValueOrEmptyString()

Get the value of a parameter by its class name, or an empty string if not set

public getParamValueOrEmptyString(string $paramClass) : string
Parameters
$paramClass : string
Return values
string

toArray()

Get the context as an array

public toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

hasParam()

Check if a parameter exists

private hasParam(string $paramClass) : bool
Parameters
$paramClass : string
Return values
bool

        
On this page

Search results