\Blackpulp\MinistryPlatformTable

This class handles table-specific interactions and instantiates records.

Summary

Methods
Properties
Constants
__construct()
getPrimaryKey()
getName()
getMpInstance()
makeRecord()
No public properties found
No constants found
No protected methods found
$primary_key
$table_name
$mp
N/A
No private methods found
No private properties found
N/A

Properties

$primary_key

$primary_key : string

The name of the Primary Key field of the table.

Type

string

$table_name

$table_name : string

The name of the table

Type

string

Methods

__construct()

__construct(\Blackpulp\MinistryPlatform\MinistryPlatform  $mp, string  $table, string  $primary_key) 

Instantiate a Table object

Parameters

\Blackpulp\MinistryPlatform\MinistryPlatform $mp
string $table
string $primary_key

getPrimaryKey()

getPrimaryKey() : string

Retrieve the name of the current Primary Key field.

Returns

string

getName()

getName() : string

Retrieve the name of the current table.

Returns

string

makeRecord()

makeRecord(array  $fields) : \Blackpulp\MinistryPlatform\Record

Create a new Record instance from the current Table instance.

Parameters

array $fields

Returns

\Blackpulp\MinistryPlatform\Record