ExplodeSettingTrait
Trait providing support for converting delimited settings to arrays
Tags
Table of Contents
- explodeListSetting() : array<string|int, mixed>
- Explode a comma-delimited setting to an array of trimmed values
- explodeSetting() : array<string|int, mixed>
- Explode a delimited setting to an array
Methods
explodeListSetting()
Explode a comma-delimited setting to an array of trimmed values
protected
explodeListSetting(string $value) : array<string|int, mixed>
Parameters
- $value : string
-
Setting value
Return values
array<string|int, mixed> —explodeSetting()
Explode a delimited setting to an array
protected
explodeSetting(string $value[, bool $trim = false ][, string $separator = ':' ]) : array<string|int, mixed>
Parameters
- $value : string
-
Setting value
- $trim : bool = false
-
Whether to trim the values (disabled by default to ensure any valid blank entry does not get trimmed, and to avoid doing extra work on each execution)
- $separator : string = ':'
-
Separator