InputValidator
in package
FinalYes
Input validation utilities.
Table of Contents
Methods
- has_array_access() : bool
- Verify whether a received input parameter is _accessible as if it were an array_.
- is_curl_handle() : bool
- Verify whether a received input parameter is a Curl handle.
- is_numeric_array_key() : bool
- Verify whether a received input parameter is usable as an integer array key.
- is_string_or_stringable() : bool
- Verify that a received input parameter is of type string or is "stringable".
- is_stringable_object() : bool
- Verify whether a received input parameter is "stringable".
Methods
has_array_access()
Verify whether a received input parameter is _accessible as if it were an array_.
public
static has_array_access(mixed $input) : bool
Parameters
- $input : mixed
-
Input parameter to verify.
Return values
boolis_curl_handle()
Verify whether a received input parameter is a Curl handle.
public
static is_curl_handle(mixed $input) : bool
The PHP Curl extension worked with resources prior to PHP 8.0 and with
an instance of the CurlHandle
class since PHP 8.0.
Parameters
- $input : mixed
-
Input parameter to verify.
Return values
boolis_numeric_array_key()
Verify whether a received input parameter is usable as an integer array key.
public
static is_numeric_array_key(mixed $input) : bool
Parameters
- $input : mixed
-
Input parameter to verify.
Return values
boolis_string_or_stringable()
Verify that a received input parameter is of type string or is "stringable".
public
static is_string_or_stringable(mixed $input) : bool
Parameters
- $input : mixed
-
Input parameter to verify.
Return values
boolis_stringable_object()
Verify whether a received input parameter is "stringable".
public
static is_stringable_object(mixed $input) : bool
Parameters
- $input : mixed
-
Input parameter to verify.