Simply sanitize value to array with no conversions
This is the same as the array()
sanitizer except that it does not attempt to convert delimited/csv strings to arrays. Meaning, a delimited string would simply become an array
with the first item being that delimited string.
Available since version 3.0.165.
Usage
// basic usage
$array = $sanitizer->arrayVal(mixed $value);
// usage with all arguments
$array = $sanitizer->arrayVal(mixed $value, $options = []);
Arguments
Name | Type(s) | Description |
---|---|---|
value | mixed | |
options (optional) |
Return value
array
Exceptions
Method can throw exceptions on error:
WireException
$sanitizer methods and properties
API reference based on ProcessWire core version 3.0.236