ConfigHelper
abstract class ConfigHelper
Methods
static array
filterConfig(array $config, string $target = 'PHP')
Recursively filter a config array to replace variants with the desired value
static mixed
generateQuickMatchFromList(array $strings)
Generate a quickMatch string from a list of strings
static array
optimizeArray(array $config, array $cache = [])
Optimize the size of a deep array by deduplicating identical structures
static array
toArray(mixed $value, bool $keepEmpty = false, bool $keepNull = false)
Convert a structure to a (possibly multidimensional) array
Details
at line 25
static array
filterConfig(array $config, string $target = 'PHP')
Recursively filter a config array to replace variants with the desired value
at line 56
static mixed
generateQuickMatchFromList(array $strings)
Generate a quickMatch string from a list of strings
This is basically a LCS implementation, tuned for small strings and fast failure
at line 107
static array
optimizeArray(array $config, array $cache = [])
Optimize the size of a deep array by deduplicating identical structures
This method is meant to be used on a config array which is only read and never modified
at line 141
static array
toArray(mixed $value, bool $keepEmpty = false, bool $keepNull = false)
Convert a structure to a (possibly multidimensional) array