public function getConfigList($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)) {
throw new Exception($this->location . ': The option ' . var_export($name, true) . ' is not an array.');
}
$out = array();
foreach ($ret as $index => $config) {
$newLoc = $this->location . '[' . var_export($name, true) . '][' . var_export($index, true) . ']';
if (!is_array($config)) {
throw new Exception($newLoc . ': The value of this element was expected to be an array.');
}
$out[$index] = self::loadFromArray($config, $newLoc);
}
return $out;
}