Documentation

CRM_Utils_API_MatchOption
in package
implements API_Wrapper

Class CRM_Utils_API_MatchOption

Table of Contents

Interfaces

API_Wrapper
Interface API_Wrapper

Properties

$_singleton  : CRM_Utils_API_MatchOption

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

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
inheritDoc
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
throws
CRM_Core_Exception
Return values
array<string|int, mixed>

revised $createParams, including 'id' if known

toApiOutput()

Interface for interpreting api output.

public toApiOutput(mixed $apiRequest, mixed $result) : array<string|int, mixed>
Parameters
$apiRequest : mixed
$result : mixed
Tags
inheritDoc
Return values
array<string|int, mixed>

modified $result


        
On this page

Search results