SmsLineBy extends BaseConfigurable
Table of Contents
Constants
- ID = 'smslineby'
- JSON_API_URL = 'https://api.smsline.by/v3/'
Methods
- canUse() : bool
- Check can use state of sender.
- className() : mixed
- clearOptions() : bool
- confirmRegistration() : Result
- disableDemo() : $this
- Disable demo mode.
- enableDemo() : $this
- Enable demo mode.
- getConfigComponentTemplatePageName() : string
- getDefaultFrom() : null|string
- Get default From.
- getExternalId() : mixed
- getExternalManageUrl() : string
- getFirstFromList() : mixed|null
- getFromList() : mixed
- getId() : mixed
- getManageUrl() : string
- getMessageStatus() : mixed
- getName() : string
- getOwnerInfo() : array<string|int, mixed>
- getShortName() : string
- getTemplatesList() : array<string|int, mixed>
- List of available templates for templates-based senders Should return array of templates like this:
- getType() : mixed
- 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() : mixed
- Prepare template for save in message headers
- register() : 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.)
Constants
ID
public
mixed
ID
= 'smslineby'
JSON_API_URL
public
mixed
JSON_API_URL
= 'https://api.smsline.by/v3/'
Methods
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
$thisgetConfigComponentTemplatePageName()
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() : mixed
getId()
public
getId() : mixed
getManageUrl()
public
getManageUrl() : string
Return values
stringgetMessageStatus()
public
getMessageStatus(array<string|int, mixed> $messageFields) : mixed
Parameters
- $messageFields : array<string|int, mixed>
getName()
public
getName() : string
Return values
stringgetOwnerInfo()
public
getOwnerInfo() : array<string|int, mixed>
Return values
array<string|int, mixed> —[ 'login' => '' ]
getShortName()
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() : mixed
isConfigurable()
public
isConfigurable() : mixed
isConfirmed()
Check is registration confirmed.
public
isConfirmed() : bool
Return values
boolisCorrectFrom()
public
isCorrectFrom(string $from) : bool
Parameters
- $from : string
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
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) : mixed
Parameters
- $templateData : mixed
register()
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
$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