public static function parseString($String, $Name)
{
// Define the variable properly.
${$Name} = null;
// Parse the string
if (!empty($String)) {
$String = trim(str_replace(array('<?php', '<?', '?>'), '', $String));
$Parsed = eval($String);
if ($Parsed === false) {
return false;
}
}
// Make sure the config variable is here and is an array.
if (is_null(${$Name}) || !is_array(${$Name})) {
${$Name} = array();
}
return ${$Name};
}