public static function importFromIni($iniFile)
{
$ini = jIniFile::read($iniFile);
if ($ini === false) {
throw new Exception('Bad ini file: ' . basename($iniFile));
}
foreach ($ini as $section => $node) {
if (strpos($section, 'pref:') === 0) {
$p = new jPrefItem();
$p->setFromIniNode($section, $node);
self::addPreference($p);
} elseif (strpos($section, 'group:') === 0) {
$p = new jPrefItemGroup();
$p->setFromIniNode($section, $node);
self::addGroup($p);
}
}
}