OrderCompleteEvent
extends GenericHookEvent
in package
Class OrderCompleteEvent
Table of Contents
Properties
- $contributionID : int
- The Contribution ID that was Completed
- $params : array<string|int, mixed>
- Optional array of additional parameters that can be passed in.
- $hookFields : array<string|int, mixed>
- $hookFieldsFlip : array<string|int, mixed>
- $hookValues : array<string|int, mixed>
Methods
- __construct() : mixed
- Class constructor
- __get() : mixed
- __isset() : mixed
- __set() : mixed
- __unset() : mixed
- addReturnValues() : GenericHookEvent
- create() : GenericHookEvent
- Create a GenericHookEvent using key-value pairs.
- createOrdered() : GenericHookEvent
- Create a GenericHookEvent using ordered parameters.
- getHookValues() : array<string|int, mixed>
- getReturnValues() : mixed
- hasField() : bool
- Determine whether the hook supports the given field.
- validateParams() : array<string|int, mixed>
- Allow us to strictly limit (and deprecate/introduce) accepted parameters
Properties
$contributionID
The Contribution ID that was Completed
public
int
$contributionID
$params
Optional array of additional parameters that can be passed in.
public
array<string|int, mixed>
$params
= []
We needed this for the "effectiveDate" parameter because it's currently too hard to work out if it's actually needed and would otherwise stop us from adding the OrderCompleteEvent. It should be assumed that accepted parameters may change in the future or be removed altogether. All parameters are passed through an internal function and deprecated warnings emitted if unknown parameters are passed in. Currently we ONLY support:
- effective_date: If provided, specify an alternative date to use as "today" calculation of membership dates
$hookFields
protected
array<string|int, mixed>
$hookFields
Ex: array(0 => 'contactID', 1 => 'contentPlacement').
$hookFieldsFlip
protected
array<string|int, mixed>
$hookFieldsFlip
Ex: array('contactID' => 0, 'contentPlacement' => 1).
$hookValues
protected
array<string|int, mixed>
$hookValues
Ex: array(0 => &$contactID, 1 => &$contentPlacement).
Methods
__construct()
Class constructor
public
__construct(int $contributionID[, array<string|int, mixed> $params = [] ]) : mixed
Parameters
- $contributionID : int
- $params : array<string|int, mixed> = []
__get()
public
& __get(mixed $name) : mixed
Parameters
- $name : mixed
Tags
__isset()
public
__isset(mixed $name) : mixed
Parameters
- $name : mixed
Tags
__set()
public
__set(mixed $name, mixed $value) : mixed
Parameters
- $name : mixed
- $value : mixed
Tags
__unset()
public
__unset(mixed $name) : mixed
Parameters
- $name : mixed
Tags
addReturnValues()
public
addReturnValues(mixed $fResult) : GenericHookEvent
Parameters
- $fResult : mixed
Return values
GenericHookEventcreate()
Create a GenericHookEvent using key-value pairs.
public
static create(array<string|int, mixed> $params) : GenericHookEvent
Parameters
- $params : array<string|int, mixed>
-
Ex: array('contactID' => &$contactID, 'contentPlacement' => &$contentPlacement).
Return values
GenericHookEventcreateOrdered()
Create a GenericHookEvent using ordered parameters.
public
static createOrdered(array<string|int, mixed> $hookFields, array<string|int, mixed> $hookValues) : GenericHookEvent
Parameters
- $hookFields : array<string|int, mixed>
-
Ex: array(0 => 'contactID', 1 => 'contentPlacement').
- $hookValues : array<string|int, mixed>
-
Ex: array(0 => &$contactID, 1 => &$contentPlacement).
Return values
GenericHookEventgetHookValues()
public
getHookValues() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —Ex: array(0 => &$contactID, 1 => &$contentPlacement).
getReturnValues()
public
getReturnValues() : mixed
hasField()
Determine whether the hook supports the given field.
public
hasField(string $name) : bool
The field may or may not be empty. Use isset() or empty() to check that.
Parameters
- $name : string
Return values
boolvalidateParams()
Allow us to strictly limit (and deprecate/introduce) accepted parameters
private
validateParams(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
- $params : array<string|int, mixed>