CRM_Utils_API_MatchOption
in package
implements
API_Wrapper
Class CRM_Utils_API_MatchOption
Table of Contents
Interfaces
- API_Wrapper
- Interface API_Wrapper
Properties
Methods
- createGetParams() : array<string|int, mixed>
- Create APIv3 "get" parameters to lookup an existing record using $keys
- fromApiInput() : array<string|int, mixed>
- Interface for interpreting api input.
- match() : array<string|int, mixed>
- Attempt to match a contact. This filters/updates the $createParams if there is a match.
- singleton() : CRM_Utils_API_MatchOption
- Singleton function.
- toApiOutput() : array<string|int, mixed>
- Interface for interpreting api output.
Properties
$_singleton
private
static CRM_Utils_API_MatchOption
$_singleton
= \NULL
Methods
createGetParams()
Create APIv3 "get" parameters to lookup an existing record using $keys
public
createGetParams(array<string|int, mixed> $origParams, array<string|int, mixed> $keys) : array<string|int, mixed>
Parameters
- $origParams : array<string|int, mixed>
-
Api request.
- $keys : array<string|int, mixed>
-
List of keys to match against.
Return values
array<string|int, mixed> —APIv3 $params
fromApiInput()
Interface for interpreting api input.
public
fromApiInput(mixed $apiRequest) : array<string|int, mixed>
Parameters
- $apiRequest : mixed
Tags
Return values
array<string|int, mixed> —modified $apiRequest
match()
Attempt to match a contact. This filters/updates the $createParams if there is a match.
public
match(string $entity, array<string|int, mixed> $createParams, array<string|int, mixed> $keys, bool $isMandatory) : array<string|int, mixed>
Parameters
- $entity : string
- $createParams : array<string|int, mixed>
- $keys : array<string|int, mixed>
- $isMandatory : bool
Tags
Return values
array<string|int, mixed> —revised $createParams, including 'id' if known
singleton()
Singleton function.
public
static singleton() : CRM_Utils_API_MatchOption
Return values
CRM_Utils_API_MatchOptiontoApiOutput()
Interface for interpreting api output.
public
toApiOutput(mixed $apiRequest, mixed $result) : array<string|int, mixed>
Parameters
- $apiRequest : mixed
- $result : mixed
Tags
Return values
array<string|int, mixed> —modified $result