Documentation

IntegrationBase

AbstractYes

Base class integrations need to extend.

Tags
author

Partydragen

version
2.1.0
license

MIT

Table of Contents

Properties

$_icon  : string
$_language  : Language
$_name  : string
$_order  : int|null
$_settings  : string|null
$_data  : IntegrationData
$_db  : DB
$_errors  : array<string|int, mixed>

Methods

__construct()  : mixed
addError()  : void
Add an error to the errors array.
afterRegistrationValidation()  : mixed
Called after registration validation.
allowLinking()  : bool
Should we allow linking with this integration?
beforeRegistrationValidation()  : mixed
Called before registration validation.
data()  : IntegrationData
Get the integration data.
getErrors()  : array<string|int, mixed>
Get any errors from the functions given by this integration.
getIcon()  : string
Get the icon of this integration.
getLanguage()  : Language
Get language.
getName()  : string
Get the name of this integration.
getOrder()  : int
Get the display order of this integration.
getSettings()  : string
Get the settings path for this integration.
isEnabled()  : bool
Get if this integration is enabled.
onLinkRequest()  : mixed
Called when user wants to link their account from user connections page, Does not need to be verified.
onRegistrationPageLoad()  : mixed
Called when register page being loaded.
onSuccessfulVerification()  : mixed
Called when the user have successfully validated the ownership of the account.
onUnlinkRequest()  : mixed
Called when user wants to unlink their integration user from connections page.
onVerifyRequest()  : mixed
Called when user wants to continue to verify their integration user from connections page.
successfulRegistration()  : mixed
Called when user is successfully registered.
syncIntegrationUser()  : bool
Called when user integration is requested to be synced.
validateIdentifier()  : bool
Validate identifier when it being linked or updated.
validateUsername()  : bool
Validate username when it being linked or updated.

Properties

Methods

addError()

Add an error to the errors array.

public addError(string $error) : void
Parameters
$error : string

The error message

afterRegistrationValidation()

Called after registration validation.

public abstract afterRegistrationValidation() : mixed

allowLinking()

Should we allow linking with this integration?

public allowLinking() : bool
Return values
bool

Whether to allow linking with this integration

beforeRegistrationValidation()

Called before registration validation.

public abstract beforeRegistrationValidation(Validate $validate) : mixed
Parameters
$validate : Validate

getErrors()

Get any errors from the functions given by this integration.

public getErrors() : array<string|int, mixed>
Return values
array<string|int, mixed>

Any errors

getIcon()

Get the icon of this integration.

public getIcon() : string
Return values
string

Icon of integration.

getName()

Get the name of this integration.

public getName() : string
Return values
string

Name of integration.

getOrder()

Get the display order of this integration.

public getOrder() : int
Return values
int

Display order of integration.

getSettings()

Get the settings path for this integration.

public getSettings() : string
Return values
string

Integration settings path.

isEnabled()

Get if this integration is enabled.

public isEnabled() : bool
Return values
bool

Check if integration is enabled

onLinkRequest()

Called when user wants to link their account from user connections page, Does not need to be verified.

public abstract onLinkRequest(User $user) : mixed
Parameters
$user : User

onRegistrationPageLoad()

Called when register page being loaded.

public abstract onRegistrationPageLoad(Fields $fields) : mixed
Parameters
$fields : Fields

onSuccessfulVerification()

Called when the user have successfully validated the ownership of the account.

public abstract onSuccessfulVerification(IntegrationUser $integrationUser) : mixed
Parameters
$integrationUser : IntegrationUser

onUnlinkRequest()

Called when user wants to unlink their integration user from connections page.

public abstract onUnlinkRequest(User $user) : mixed
Parameters
$user : User

onVerifyRequest()

Called when user wants to continue to verify their integration user from connections page.

public abstract onVerifyRequest(User $user) : mixed
Parameters
$user : User

successfulRegistration()

Called when user is successfully registered.

public abstract successfulRegistration(User $user) : mixed
Parameters
$user : User

syncIntegrationUser()

Called when user integration is requested to be synced.

public abstract syncIntegrationUser(IntegrationUser $integration_user) : bool
Parameters
$integration_user : IntegrationUser
Return values
bool

validateIdentifier()

Validate identifier when it being linked or updated.

public abstract validateIdentifier(string $identifier[, int $integration_user_id = 0 ]) : bool
Parameters
$identifier : string

The identifier value to validate.

$integration_user_id : int = 0

The integration user id to ignore during duplicate check.

Return values
bool

Whether this validation passed or not.

validateUsername()

Validate username when it being linked or updated.

public abstract validateUsername(string $username[, int $integration_user_id = 0 ]) : bool
Parameters
$username : string

The username value to validate.

$integration_user_id : int = 0

The integration user id to ignore during duplicate check.

Return values
bool

Whether this validation passed or not.


        
On this page

Search results