Properties

$p_map

$p_map : 

Used to store map of probabilities when seeking duplicates for given person/group

Type

$membership_cache

$membership_cache : 

Cache memberships when possible

Type

$threshold

$threshold : 

Minimum score to count as duplicate

Type

Methods

find_duplicates_person()

find_duplicates_person(\org_openpsa_contacts_person_dba  $person,   $threshold = 1) : array<mixed,\org_openpsa_contacts_person_dba>

Find duplicates for given org_openpsa_contacts_person_dba object

Parameters

\org_openpsa_contacts_person_dba $person

object (does not need id)

$threshold

Returns

array<mixed,\org_openpsa_contacts_person_dba> —

array of possible duplicates

p_duplicate_person()

p_duplicate_person(array  $person1, array  $person2) : array

Calculates P for the given two persons being duplicates

Parameters

array $person1
array $person2

Returns

array —

with overall P and matched checks

find_duplicates_group()

find_duplicates_group(\org_openpsa_contacts_group_dba  $group,   $threshold = 1) : array<mixed,\org_openpsa_contacts_group_dba>

Find duplicates for given org_openpsa_contacts_group_dba object

Parameters

\org_openpsa_contacts_group_dba $group

Group object (does not need id)

$threshold

Returns

array<mixed,\org_openpsa_contacts_group_dba> —

List of possible duplicates

p_duplicate_group()

p_duplicate_group(array  $group1, array  $group2) : array

Calculates P for the given two persons being duplicates

Parameters

array $group1
array $group2

Returns

array —

with overall P and matched checks

check_all_persons()

check_all_persons(  $threshold = 1) : array

Find duplicates for given all org_openpsa_contacts_person_dba objects in database

Parameters

$threshold

Returns

array —

array of persons with their possible duplicates

check_all_groups()

check_all_groups(  $threshold = 1) : array

Find duplicates for given all org_openpsa_contacts_group_dba objects in database

Parameters

$threshold

Returns

array —

array of groups with their possible duplicates

mark_all()

mark_all(  $output = false) 

Parameters

$output

mark_all_persons()

mark_all_persons(  $output = false) 

Find all duplicate persons and mark them

Parameters

$output

mark_all_groups()

mark_all_groups(  $output = false) 

Find all duplicate groups and mark them

Parameters

$output

match()

match(  $property, array  $data1, array  $data2) 

Parameters

$property
array $data1
array $data2

load_memberships()

load_memberships(  $id) 

Get membership maps

Parameters

$id

normalize_fields()

normalize_fields(array  $arr,   $guid) 

Prepare fields for easier comparison

Parameters

array $arr
$guid

check_all_arraywalk()

check_all_arraywalk(array  $arr1,   $key1, array  $params) 

Used by check_all_xxx() -method to walk the QB result and checking each against the rest

Parameters

array $arr1
$key1
array $params

output()

output(  $output,   $message,   $indent = '') 

Parameters

$output
$message
$indent