\DBL

This is the Database Layer class - it acts as middleware between the application and the database, and is mainly used for defining methods that create new rows in the database.

Summary

Methods
Properties
Constants
createMediationCentreOffer()
createMediatorOffer()
createMediationEntityOffer()
createEvidence()
createDispute()
createDisputeParty()
ensureCorrectAccountTypes()
createLifespan()
createNotification()
createMessage()
createOrganisation()
createIndividual()
createAccountDetails()
getLatestId()
getLatestRow()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

createMediationCentreOffer()

createMediationCentreOffer(  $params) 

Parameters

$params

createMediatorOffer()

createMediatorOffer(  $params) 

Parameters

$params

createMediationEntityOffer()

createMediationEntityOffer(  $params,   $type) 

Parameters

$params
$type

createEvidence()

createEvidence(  $params) 

Parameters

$params

createDispute()

createDispute(Array  $details) : \Dispute

Creates a new Dispute, saving it to the database.

Parameters

Array $details

Array of details to populate the database with.

Returns

\Dispute

The Dispute object associated with the new entry.

createDisputeParty()

createDisputeParty(  $organisationId,   $individualId = NULL,   $summary = NULL) 

Parameters

$organisationId
$individualId
$summary

ensureCorrectAccountTypes()

ensureCorrectAccountTypes(  $accountTypes) 

Parameters

$accountTypes

createLifespan()

createLifespan(Array  $params,   $allowDatesInThePast = false) : \Lifespan

Creates a new lifespan proposal.

Parameters

Array $params

Parameters outlining start and end dates, etc.

$allowDatesInThePast

Returns

\Lifespan

The newly created lifespan.

createNotification()

createNotification(  $options) 

Parameters

$options

createMessage()

createMessage(  $params) 

Parameters

$params

createOrganisation()

createOrganisation(  $orgObject) 

Parameters

$orgObject

createIndividual()

createIndividual(  $individualObject) 

Parameters

$individualObject

createAccountDetails()

createAccountDetails(Array  $object) : integer

Stores account details in the database.

Parameters

Array $object

An array of registration values, including email and password.

Returns

integer —

The login ID associated with the newly registered account.

getLatestId()

getLatestId(String  $tableName, String  $idName) : Int

Returns the latest ID in the database from table name $tableName, ordered by primary key $idName (DESC).

Calls DBL::getLatestRow internally.

Parameters

String $tableName

Name of the table.

String $idName

Primary key of the table.

Returns

Int —

The primary key of the latest database entry.

getLatestRow()

getLatestRow(String  $tableName, String  $idName) : Array

Returns the latest row in the database from table name $tableName, ordered by primary key $idName (DESC).

Parameters

String $tableName

Name of the table.

String $idName

Primary key of the table.

Returns

Array —

Latest table row.