Documentation

MatchParamTrait

Table of Contents

Properties

$match  : array<string|int, mixed>
Specify fields to match for update.

Methods

getMatch()  : bool
setMatch()  : $this
getMatchFields()  : array<string|int, mixed>
Options callback for $this->match
matchExisting()  : mixed
Find existing record based on $this->match param

Properties

$match

Specify fields to match for update.

protected array<string|int, mixed> $match = []

The API will perform an update if an existing $ENTITY matches all specified fields.

Note: the fields named in this param should be without any options suffix (e.g. my_field not my_field:name). Any options suffixes in the $records will be resolved by the api prior to matching.

Tags
optionsCallback

getMatchFields

Methods

setMatch()

public setMatch([array<string|int, mixed> $match = ]) : $this

Specify fields to match for update.

Parameters
$match : array<string|int, mixed> =
Return values
$this

getMatchFields()

Options callback for $this->match

protected getMatchFields() : array<string|int, mixed>
Return values
array<string|int, mixed>

matchExisting()

Find existing record based on $this->match param

protected matchExisting(mixed &$record) : mixed
Parameters
$record : mixed

        
On this page

Search results