SimpleSAML_Configuration::getArrayize PHP Method

getArrayize() public method

If the configuration option isn't an array, it will be converted to an array.
public getArrayize ( string $name, mixed $default = self::REQUIRED_OPTION ) : array
$name string The name of the option.
$default mixed A default value which will be returned if the option isn't found. The option will be required if this parameter isn't given. The default value can be any value, including null.
return array The option with the given name, or $default if the option isn't found and $default is specified.
    public function getArrayize($name, $default = self::REQUIRED_OPTION)
    {
        assert('is_string($name)');
        $ret = $this->getValue($name, $default);
        if ($ret === $default) {
            // the option wasn't found, or it matches the default value. In any case, return this value
            return $ret;
        }
        if (!is_array($ret)) {
            $ret = array($ret);
        }
        return $ret;
    }