\Blackpulp\MinistryPlatformFindContact

This class handles the process of finding a Contact.

Summary

Methods
Properties
Constants
__construct()
getStoredProcedure()
setStoredProcedure()
getMatches()
getNumberOfMatches()
getUserAndAuthenticate()
No public properties found
No constants found
setMatches()
$first_name
$last_name
$optional_fields
$sp
$matches
$number_of_matches
$mp
N/A
No private methods found
No private properties found
N/A

Properties

$first_name

$first_name : string

first name

Type

string

$last_name

$last_name : string

last name

Type

string

$optional_fields

$optional_fields : array

optional_fields

Type

array — associative array of all optional matching parameters

$sp

$sp : string

stored procedure used to match contacts

Type

string

$number_of_matches

$number_of_matches : integer

Number of Matches

Type

integer

Methods

__construct()

__construct(\Blackpulp\MinistryPlatform\MinistryPlatform  $mp, string  $first_name, string  $last_name, array  $optional_fields) 

Construct Method

Parameters

\Blackpulp\MinistryPlatform\MinistryPlatform $mp
string $first_name
string $last_name
array $optional_fields

getStoredProcedure()

getStoredProcedure() : string

Get the name of the current stored procedure

Returns

string

setStoredProcedure()

setStoredProcedure(string  $sp) 

Configure the stored procedure to be used for contact matching.

Parameters

string $sp

getNumberOfMatches()

getNumberOfMatches() : integer

Gets the Number of Matches.

Returns

integer

getUserAndAuthenticate()

getUserAndAuthenticate() : \Blackpulp\MinistryPlatform\MinistryPlatform\Blackpulp\User

Authenticate a uniquely matched user.

As long as there is exactly one match and that match has a valid User Account, go ahead and process authentication for them.

Returns

\Blackpulp\MinistryPlatform\MinistryPlatform\Blackpulp\User

setMatches()

setMatches() : $this

Sets the $matches and $number_of_matches properties

Executes the FindMatchingContact stored procedure via MinistryPlatform. Also allows users to override the default stored procedure and the parameters passed to the stored procedure.

Returns

$this