$wsdl
$wsdl : string
An absolute URL to the MinistryPlatform API endpoint.
This class handles the bulk of the MinistryPlatform API interactions.
authenticate( $username, string $password) : \Blackpulp\MinistryPlatform\User
Authenticate a user via MinistryPlatform.
$username | ||
string | $password | This is the non-hashed password value. |
storedProcedure(string $sp, array $request = array()) : \Blackpulp\MinistryPlatform\StoredProcedureResult
Execute a stored procedure.
string | $sp | The name of the stored procedure. |
array | $request | An array of Stored Procedure parameters |
makeRecord(string $table, string $primary_key, array $fields) : \Blackpulp\MinistryPlatform\Record
Create a new MinistryPlatform record object.
string | $table | The name of the database table |
string | $primary_key | The field name of the specified table's primary key. |
array | $fields | An array of field names and their values |
makeTable(string $name, string $primary_key) : \Blackpulp\MinistryPlatform\Table
Create a MinistryPlatform Table object.
string | $name | The name of the database table |
string | $primary_key | The field name of the specified table's primary key. |
makeFile(string $file_name, string $temp_name, string $description, integer $page_id, integer $record_id, boolean $is_image, integer $pixels) : \Blackpulp\MinistryPlatform\File
Create a MinistryPlatform File object. Used for attaching files.
string | $file_name | The name of the file as it will be saved into MinistryPlatform. |
string | $temp_name | The absolute physical path of the temp file's name. |
string | $description | A description of the file. |
integer | $page_id | The Page_ID value of the Record's Table in MinistryPlatform. |
integer | $record_id | The ID of the Record the file will be attached to in MinistryPlatform. |
boolean | $is_image | Simple boolean to determine whether the file is an image. |
integer | $pixels | Number of pixels to resize the longest side of an image. Use 0 to retain the original dimensions. |
addRecord(\Blackpulp\MinistryPlatform\Record $record) : array
Add Record call to MinistryPlatform.
\Blackpulp\MinistryPlatform\Record | $record |
updateRecord(\Blackpulp\MinistryPlatform\Record $record) : array
Update Record call to MinistryPlatform.
\Blackpulp\MinistryPlatform\Record | $record |
createRecurringSeries(\Blackpulp\MinistryPlatform\RecurringRecord $recurring_record) : array
Create a set of recurring records in MinistryPlatform
\Blackpulp\MinistryPlatform\RecurringRecord | $recurring_record |
getFirstDateInSeries(\Blackpulp\MinistryPlatform\RecurringRecord $recurring_record) : array
Get the first date of a recurring series.
\Blackpulp\MinistryPlatform\RecurringRecord | $recurring_record |
$results
getRecurringRecords(\Blackpulp\MinistryPlatform\RecurringRecord $recurring_record) : \Blackpulp\MinistryPlatform\StoredProcedureResult
Get a list of each recurring date in a RecurringRecord object.
Retrieve two tables of information from MinistryPlatform based on the values of a RecurringRecord object. First, get back a table with a date representing every instance of the series. Second, get back a one-sentence description of the series (i.e. Every Tuesday from 1/1/2015 to 12/31/2015).
\Blackpulp\MinistryPlatform\RecurringRecord | $recurring_record |
getUserInfo() : \Blackpulp\MinistryPlatform\StoredProcedureResult
GetUserInfo() API call
attachFile(\Blackpulp\MinistryPlatform\File $file) : array
Attach a file to a record in MinistryPlatform.
\Blackpulp\MinistryPlatform\File | $file |
updateDefaultImage(\Blackpulp\MinistryPlatform\File $file) : array
If the current file is an image, makes that image the Record's default.
\Blackpulp\MinistryPlatform\File | $file |
SplitToArray(string $string) : array
Convert a pipe delimited string to an array.
Several MinistryPlatform API calls return a pipe-delimited string. This method is used to quickly split that string into an array.
string | $string | The pipe delimited string. |
$array
formatSoapDateTime(string $timestamp) : string
Convert the format of a datetime string.
This is used to allow datetime strings to be sent from PHP to the SOAP XML API where a datetime data type is required.
string | $timestamp | Any datetime string |
A different datetime string
execute(string $function, array $parameters) : \Blackpulp\MinistryPlatform\SimpleXMLObject
Execute the API call.
Responsible for sending the MinistryPlatform API call and returning the response.
string | $function | The name of the API method |
array | $parameters |
ConvertToString(array $array) : string
Convert an array to a request string.
This method converts arrays of data into a simple request string. In the process, it also preps strings for insertion into MP by replacing specific characters with MP-approved equivalents.
array | $array |
Request String in the format of foo=bar&foo2=bar2.