Audio
Class Audio
Table of Contents
Constants
- AUDIO_TYPE_FILE = 'file'
- AUDIO_TYPE_PRESET = 'preset'
Methods
- __construct() : mixed
- SpeechRate constructor.
- create() : static
- Create instance.
- createdFromPreset() : bool
- Does audio created from a preset
- getDbValue() : bool|string
- Get value for db (as json string)
- getDefaultFileUrl() : string
- Get default audio preset url for player.
- getDuration() : int
- get duration of current audio
- getFileId() : string
- Get file id
- getFileUrl() : bool|string|null
- Get audio file url
- getMessageCode() : string
- Get message code
- getPreset() : string
- Get preset code
- withFile() : $this
- With file.
- withJsonString() : $this
- With json value.
- withMessageCode() : $this
- With message code.
- withPreset() : $this
- With preset.
- withValue() : $this
- With value.
Constants
AUDIO_TYPE_FILE
public
mixed
AUDIO_TYPE_FILE
= 'file'
AUDIO_TYPE_PRESET
public
mixed
AUDIO_TYPE_PRESET
= 'preset'
Methods
__construct()
SpeechRate constructor.
public
__construct() : mixed
create()
Create instance.
public
static create() : static
Return values
staticcreatedFromPreset()
Does audio created from a preset
public
createdFromPreset() : bool
Return values
boolgetDbValue()
Get value for db (as json string)
public
getDbValue() : bool|string
Tags
Return values
bool|stringgetDefaultFileUrl()
Get default audio preset url for player.
public
getDefaultFileUrl() : string
Return values
stringgetDuration()
get duration of current audio
public
getDuration() : int
Return values
intgetFileId()
Get file id
public
getFileId() : string
Return values
stringgetFileUrl()
Get audio file url
public
getFileUrl([bool $useAbsoluteUrl = false ]) : bool|string|null
Parameters
- $useAbsoluteUrl : bool = false
-
Force using absolute url.
Tags
Return values
bool|string|nullgetMessageCode()
Get message code
public
getMessageCode() : string
Return values
stringgetPreset()
Get preset code
public
getPreset() : string
Return values
stringwithFile()
With file.
public
withFile([string $fileId = null ]) : $this
Parameters
- $fileId : string = null
-
File id.
Return values
$thiswithJsonString()
With json value.
public
withJsonString(string $json) : $this
Parameters
- $json : string
-
Value as json string from DB.
Return values
$thiswithMessageCode()
With message code.
public
withMessageCode([string $messageCode = null ]) : $this
Parameters
- $messageCode : string = null
-
Message code.
Return values
$thiswithPreset()
With preset.
public
withPreset([string $presetName = null ]) : $this
Parameters
- $presetName : string = null
-
Preset code.
Return values
$thiswithValue()
With value.
public
withValue(string $value) : $this
Parameters
- $value : string
-
Value from user interface.