Documentation

Finder extends AutoSubscriber
in package

AutoSubscriber allows child classes to listen to events.

Child classes must implement the getSubscribedEvents method, and the callbacks it returns will be automatically registered.

This class implies @service @internal on all subclasses.

Table of Contents

Methods

findDuplicates()  : void
findExistingDuplicates()  : void
This function exists to provide legacy hook support for finding duplicates.
getSubscribedEvents()  : array<string|int, mixed>
isTableBigger()  : int
Is the table extracted from the first string larger than the second string.
orderByTableCount()  : void
Sort queries by number of records for the table associated with them.
isQuerySetInclusive()  : array<string|int, mixed>
Function to determine if a given query set contains inclusive or exclusive set of weights.

Methods

findExistingDuplicates()

This function exists to provide legacy hook support for finding duplicates.

public static findExistingDuplicates(GenericHookEvent $event) : void
Parameters
$event : GenericHookEvent

getSubscribedEvents()

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

isTableBigger()

Is the table extracted from the first string larger than the second string.

public static isTableBigger(string $a, string $b) : int
Parameters
$a : string

e.g civicrm_contact.first_name

$b : string

e.g civicrm_address.street_address

Return values
int

orderByTableCount()

Sort queries by number of records for the table associated with them.

public static orderByTableCount(array<string|int, mixed> &$tableQueries) : void
Parameters
$tableQueries : array<string|int, mixed>

isQuerySetInclusive()

Function to determine if a given query set contains inclusive or exclusive set of weights.

private static isQuerySetInclusive(mixed $tableQueries, mixed $threshold[, array<string|int, mixed> $exclWeightSum = [] ]) : array<string|int, mixed>

The function assumes that the query set is already ordered by weight in desc order.

Parameters
$tableQueries : mixed
$threshold : mixed
$exclWeightSum : array<string|int, mixed> = []
Return values
array<string|int, mixed>

        
On this page

Search results