Search for duplicate persons and groups in database

package org.openpsa.contacts

 Methods

check_all_groups ($threshold)

Find duplicates for given all org_openpsa_contacts_group_dba objects in database

Parameters

$threshold

Returns

arrayarray of groups with their possible duplicates

check_all_persons ($threshold)

Find duplicates for given all org_openpsa_contacts_person_dba objects in database

Parameters

$threshold

Returns

arrayarray of persons with their possible duplicates

find_duplicates_group (\org_openpsa_contacts_group_dba $group, $threshold)

Find duplicates for given org_openpsa_contacts_group_dba object

Parameters

$group

\org_openpsa_contacts_group_dbaorg_openpsa_contacts_group_dba object (does not need id)

$threshold

Returns

arrayarray of possible duplicates

find_duplicates_person (\org_openpsa_contacts_person_dba $person, $threshold)

Find duplicates for given org_openpsa_contacts_person_dba object

Parameters

$person

\org_openpsa_contacts_person_dbaobject (does not need id)

$threshold

Returns

arrayarray of possible duplicates

mark_all ($output)

Parameters

$output

mark_all_groups ($output)

Find all duplicate groups and mark them

Parameters

$output

mark_all_persons ($output)

Find all duplicate persons and mark them

Parameters

$output

p_duplicate_group (array $group1, array $group2)

Calculates P for the given two persons being duplicates

Parameters

$group1

arraygroup1

$group2

arraygroup2

Returns

arraywith overall P and matched checks

p_duplicate_person (array $person1, array $person2)

Calculates P for the given two persons being duplicates

Parameters

$person1

arrayperson1

$person2

arrayperson2

Returns

arraywith overall P and matched checks

_add_constraint (\midcom_core_query $qb, \midcom_core_dbaobject $object, $field)

Parameters

$qb

$object

$field

_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

$arr1

$key1

$params

_load_memberships ($id)

Get membership maps

Parameters

$id

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

Parameters

$property

$data1

$data2

_normalize_group_fields (array $arr, $guid)

Prepare person fields for easier comparison
Static

Parameters

$arr

$guid

_normalize_person_fields (array $arr, $guid)

Prepare person fields for easier comparison
Static

Parameters

$arr

$guid

 Properties

 

mixed $config

Pointer to component configuration object.
 

mixed $p_map

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

mixed $_membership_cache

Cache memberships when possible
 

integer $_threshold

Minimum score to count as duplicate
param