Bart\Configuration\Configuration::getArray PHP Method

getArray() protected method

protected getArray ( $section, $key, array $default = [], $required = true ) : string[]
$default array
return string[] String list of value split by comma
    protected function getArray($section, $key, array $default = [], $required = true)
    {
        $rawVal = $this->getValue($section, $key, $default, $required);
        // If there is no configured value, return the default which is already an array
        if ($rawVal === $default) {
            return $default;
        }
        // I considered accepting a "split" parameter, but decided that for now
        // ...enforcing a convention of at most one space after the comma will
        // ...encourage cleaner configuration files
        return preg_split('/,(\\s)?/', $rawVal);
    }