Ednaru extends BaseConfigurable
Table of Contents
Constants
- DISABLE_INTERNATIONAL = 'disable_international'
- ID = 'ednaru'
Methods
- __construct() : mixed
- addRefreshFromListAgent() : void
- Adds agent for execution.
- canUse() : bool
- Check can use state of sender.
- checkAutoTemplatesAgent() : string
- className() : mixed
- clearOptions() : bool
- confirmRegistration() : Result
- disableDemo() : $this
- Disable demo mode.
- enableDemo() : $this
- Enable demo mode.
- getCallbackUrl() : string
- getConfigComponentTemplatePageName() : string
- getDefaultFrom() : null|string
- Get default From.
- getExternalId() : mixed
- getExternalManageUrl() : string
- getFirstFromList() : mixed|null
- getFromList() : array<string|int, array{id: int, name: string, channelPhone: string}>
- getId() : string
- getLineId() : int|null
- getManageUrl() : string
- getMessageStatus() : MessageStatus
- getMessageTemplates() : Result
- getName() : string
- getOwnerInfo() : array<string|int, mixed>
- getSentTemplateMessage() : string
- getShortName() : string
- getTemplatesList() : array<string|int, mixed>
- List of available templates for templates-based senders Should return array of templates like this:
- getType() : mixed
- isAvailable() : bool
- isConfigurable() : mixed
- isConfirmed() : bool
- Check is registration confirmed.
- isCorrectFrom() : bool
- isDemo() : bool
- Check demo status.
- isRegistered() : bool
- Check registration state.
- isSupported() : bool
- isTemplatesBased() : bool
- Can message be created from template only
- prepareMessageBodyForSave() : string
- Prepares text for message body.
- prepareTemplate() : array<string|int, mixed>
- Prepare template for save in message headers
- refreshFromList() : void
- The agent's goal is regular refreshing FromList.
- refreshFromListAgent() : string
- The agent's goal is regular refreshing FromList cache.
- register() : Result
- registerAutoTemplatesAgent() : string
- resetCallback() : Result
- resolveStatus() : int
- Converts service status to internal status
- sendConfirmationCode() : Result
- sendMessage() : SendMessage
- sendTemplate() : Result
- setDefaultFrom() : $this
- Set default From.
- setSocketTimeout() : Base
- setStreamTimeout() : Base
- sync() : $this
- Sync remote state (load From list etc.)
- testConnection() : Result
Constants
DISABLE_INTERNATIONAL
public
mixed
DISABLE_INTERNATIONAL
= 'disable_international'
ID
public
mixed
ID
= 'ednaru'
Methods
__construct()
public
__construct() : mixed
addRefreshFromListAgent()
Adds agent for execution.
public
addRefreshFromListAgent() : void
Tags
canUse()
Check can use state of sender.
public
canUse() : bool
Return values
boolcheckAutoTemplatesAgent()
public
static checkAutoTemplatesAgent() : string
Return values
stringclassName()
public
static className() : mixed
clearOptions()
public
clearOptions() : bool
Return values
boolconfirmRegistration()
public
confirmRegistration(array<string|int, mixed> $fields) : Result
Parameters
- $fields : array<string|int, mixed>
Return values
ResultdisableDemo()
Disable demo mode.
public
disableDemo() : $this
Return values
$thisenableDemo()
Enable demo mode.
public
enableDemo() : $this
Return values
$thisgetCallbackUrl()
public
getCallbackUrl() : string
Return values
stringgetConfigComponentTemplatePageName()
public
getConfigComponentTemplatePageName() : string
Return values
stringgetDefaultFrom()
Get default From.
public
getDefaultFrom() : null|string
Return values
null|stringgetExternalId()
public
getExternalId() : mixed
getExternalManageUrl()
public
getExternalManageUrl() : string
Return values
stringgetFirstFromList()
public
getFirstFromList() : mixed|null
Return values
mixed|nullgetFromList()
public
getFromList() : array<string|int, array{id: int, name: string, channelPhone: string}>
Return values
array<string|int, array{id: int, name: string, channelPhone: string}>getId()
public
getId() : string
Return values
stringgetLineId()
public
getLineId([int|null $subjectId = null ]) : int|null
Parameters
- $subjectId : int|null = null
Return values
int|nullgetManageUrl()
public
getManageUrl() : string
Return values
stringgetMessageStatus()
public
getMessageStatus(array<string|int, mixed> $messageFields) : MessageStatus
Parameters
- $messageFields : array<string|int, mixed>
Return values
MessageStatusgetMessageTemplates()
public
getMessageTemplates([string $subject = '' ]) : Result
Parameters
- $subject : string = ''
Return values
ResultgetName()
public
getName() : string
Return values
stringgetOwnerInfo()
public
getOwnerInfo() : array<string|int, mixed>
Return values
array<string|int, mixed>getSentTemplateMessage()
public
getSentTemplateMessage(string $from, string $to) : string
Parameters
- $from : string
- $to : string
Return values
stringgetShortName()
public
getShortName() : string
Return values
stringgetTemplatesList()
List of available templates for templates-based senders Should return array of templates like this:
public
getTemplatesList([array<string|int, mixed> $context = null ]) : array<string|int, mixed>
Parameters
- $context : array<string|int, mixed> = null
-
Context for context-dependant templates
Tags
Return values
array<string|int, mixed>getType()
public
getType() : mixed
isAvailable()
public
isAvailable() : bool
Return values
boolisConfigurable()
public
isConfigurable() : mixed
isConfirmed()
Check is registration confirmed.
public
isConfirmed() : bool
Return values
boolisCorrectFrom()
public
isCorrectFrom(mixed $from) : bool
Parameters
- $from : mixed
Return values
boolisDemo()
Check demo status.
public
isDemo() : bool
Return values
boolisRegistered()
Check registration state.
public
isRegistered() : bool
Return values
boolisSupported()
public
static isSupported() : bool
Return values
boolisTemplatesBased()
Can message be created from template only
public
isTemplatesBased() : bool
Tags
Return values
boolprepareMessageBodyForSave()
Prepares text for message body.
public
prepareMessageBodyForSave(string $text) : string
Parameters
- $text : string
Return values
stringprepareTemplate()
Prepare template for save in message headers
public
prepareTemplate(mixed $templateData) : array<string|int, mixed>
Parameters
- $templateData : mixed
Tags
Return values
array<string|int, mixed>refreshFromList()
The agent's goal is regular refreshing FromList.
public
refreshFromList() : void
refreshFromListAgent()
The agent's goal is regular refreshing FromList cache.
public
static refreshFromListAgent() : string
Return values
stringregister()
public
register(array<string|int, mixed> $fields) : Result
Parameters
- $fields : array<string|int, mixed>
Return values
ResultregisterAutoTemplatesAgent()
public
static registerAutoTemplatesAgent() : string
Return values
stringresetCallback()
public
resetCallback() : Result
Return values
ResultresolveStatus()
Converts service status to internal status
public
static resolveStatus(mixed $serviceStatus) : int
Parameters
- $serviceStatus : mixed
Return values
intsendConfirmationCode()
public
sendConfirmationCode() : Result
Return values
ResultsendMessage()
public
sendMessage(array<string|int, mixed> $messageFields) : SendMessage
Parameters
- $messageFields : array<string|int, mixed>
Return values
SendMessage —Send operation result.
sendTemplate()
public
sendTemplate(string $name, string $text[, array<string|int, mixed> $examples = [] ][, string|null $langCode = null ]) : Result
Parameters
- $name : string
- $text : string
- $examples : array<string|int, mixed> = []
- $langCode : string|null = null
Return values
ResultsetDefaultFrom()
Set default From.
public
setDefaultFrom(string $from) : $this
Parameters
- $from : string
-
From.
Return values
$thissetSocketTimeout()
public
setSocketTimeout(int $socketTimeout) : Base
Parameters
- $socketTimeout : int
Return values
BasesetStreamTimeout()
public
setStreamTimeout(int $streamTimeout) : Base
Parameters
- $streamTimeout : int
Return values
Basesync()
Sync remote state (load From list etc.)
public
sync() : $this
Return values
$thistestConnection()
public
testConnection() : Result