Methods
check_all_groups ($threshold)
Find duplicates for given all org_openpsa_contacts_group_dba objects in database
Parameters
$threshold
Returns
array
array 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
array
array 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_dba
org_openpsa_contacts_group_dba object (does not need id)
$threshold
Returns
array
array 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_dba
object (does not need id)
$threshold
Returns
array
array of possible duplicates
mark_all_groups ($output)
Find all duplicate groups and mark them
mark_all_persons ($output)
Find all duplicate persons and mark them
p_duplicate_group (array $group1, array $group2)
Calculates P for the given two persons being duplicates
Parameters
$group1
array
group1
$group2
array
group2
Returns
array
with overall P and matched checks
p_duplicate_person (array $person1, array $person2)
Calculates P for the given two persons being duplicates
Parameters
$person1
array
person1
$person2
array
person2
Returns
array
with 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
_match ($property, array $data1, array $data2)
Parameters
$property
$data1
$data2
_normalize_group_fields (array $arr, $guid)
Prepare person fields for easier comparison
Static
_normalize_person_fields (array $arr, $guid)
Prepare person fields for easier comparison
Static
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