ExpressSmsCommand
in package
FinalYes
Parsed text of an incoming premium SMS — see {@see ExpressSmsParser::parse()}.
Three shapes reach the endpoint:
- express
KEYWORD MODULE SERVICE ID— pay one service of one object, no payment exists yet, - form
KEYWORD CODE— the payment was created first (payment form), code is itscode, - invalid anything else (wrong keyword, missing words, non-numeric id).
Nothing here is trusted: the text comes from whoever sent the SMS.
Table of Contents
Constants
- KIND_EXPRESS : string = 'express'
- KIND_FORM : string = 'form'
- KIND_INVALID : string = 'invalid'
Properties
- $formCode : string
- $invalidReason : string
- $kind : string
- $moduleCode : string
- $objectId : int
- $serviceCode : string
Methods
- express() : self
- form() : self
- invalid() : self
- isExpress() : bool
- isForm() : bool
- __construct() : mixed
Constants
KIND_EXPRESS
public
string
KIND_EXPRESS
= 'express'
KIND_FORM
public
string
KIND_FORM
= 'form'
KIND_INVALID
public
string
KIND_INVALID
= 'invalid'
Properties
$formCode read-only
public
string
$formCode
= ''
$invalidReason read-only
public
string
$invalidReason
= ''
$kind read-only
public
string
$kind
$moduleCode read-only
public
string
$moduleCode
= ''
$objectId read-only
public
int
$objectId
= 0
$serviceCode read-only
public
string
$serviceCode
= ''
Methods
express()
public
static express(string $moduleCode, string $serviceCode, int $objectId) : self
Parameters
- $moduleCode : string
- $serviceCode : string
- $objectId : int
Return values
selfform()
public
static form(string $formCode) : self
Parameters
- $formCode : string
Return values
selfinvalid()
public
static invalid(string $reason) : self
Parameters
- $reason : string
Return values
selfisExpress()
public
isExpress() : bool
Return values
boolisForm()
public
isForm() : bool
Return values
bool__construct()
private
__construct(string $kind[, string $moduleCode = '' ][, string $serviceCode = '' ][, int $objectId = 0 ][, string $formCode = '' ][, string $invalidReason = '' ]) : mixed
Parameters
- $kind : string
- $moduleCode : string = ''
- $serviceCode : string = ''
- $objectId : int = 0
- $formCode : string = ''
- $invalidReason : string = ''