SmsEdnaru extends BaseConfigurable uses RussianProvider
Table of Contents
Constants
- ID = 'smsednaru'
Methods
- __construct() : mixed
- addRefreshFromListAgent() : void
- Adds agent for execution.
- canUse() : bool
- Check can use state of sender.
- 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() : string
- getExternalManageUrl() : string
- getFirstFromList() : mixed|null
- getFromList() : array<string|int, array{id: int, name: string, channelPhone: string}>
- getId() : string
- getManageUrl() : string
- getMessageStatus() : MessageStatus
- getMessageTemplates() : Result
- getName() : string
- getOwnerInfo() : array<string|int, mixed>
- getRegistrationUrl() : string
- 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() : string
- isConfigurable() : mixed
- isConfirmed() : bool
- Check is registration confirmed.
- isCorrectFrom() : bool
- isDemo() : bool
- Check demo status.
- isMigratedToNewAPI() : bool
- isRegistered() : bool
- Check registration state.
- isSupported() : bool
- isTemplatesBased() : bool
- Can message be created from template only
- migrateToNewApi() : void
- prepareMessageBodyForSave() : string
- Prepares text for message body.
- prepareTemplate() : 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
- resolveStatus() : int
- Converts service status to internal status
- sendConfirmationCode() : Result
- sendMessage() : SendMessage
- sendTemplate() : Result
- setDefaultFrom() : $this
- Set default From.
- setNewApi() : void
- setSocketTimeout() : Base
- setStreamTimeout() : Base
- sync() : $this
- Sync remote state (load From list etc.)
Constants
ID
public
mixed
ID
= 'smsednaru'
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
boolclassName()
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() : string
Return values
stringgetExternalManageUrl()
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
stringgetManageUrl()
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>getRegistrationUrl()
public
getRegistrationUrl() : string
Return values
stringgetSentTemplateMessage()
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>|null $context = null ]) : array<string|int, mixed>
[ ['ID' => '1', 'TITLE' => 'Template 1', 'PREVIEW' => 'Message created from template 1'], ['ID' => '2', 'TITLE' => 'Template 2', 'PREVIEW' => 'Message created from template 2'], ]
Parameters
- $context : array<string|int, mixed>|null = null
-
Context for context-dependant templates
Return values
array<string|int, mixed>getType()
public
getType() : string
Return values
stringisConfigurable()
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
boolisMigratedToNewAPI()
public
isMigratedToNewAPI() : 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
Return values
boolmigrateToNewApi()
public
migrateToNewApi() : void
prepareMessageBodyForSave()
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) : mixed
Parameters
- $templateData : 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
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
$thissetNewApi()
public
setNewApi(bool $mode) : void
Parameters
- $mode : bool
setSocketTimeout()
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