20         if (!
$config->get(
'Attr.EnableID')) 
return false;
 
   24         if ($id === 
'') 
return false;
 
   26         $prefix = 
$config->get(
'Attr.IDPrefix');
 
   28             $prefix .= 
$config->get(
'Attr.IDPrefixLocal');
 
   30             if (strpos($id, $prefix) !== 0) $id = $prefix . $id;
 
   31         } elseif (
$config->get(
'Attr.IDPrefixLocal') !== 
'') {
 
   32             trigger_error(
'%Attr.IDPrefixLocal cannot be used unless '.
 
   33                 '%Attr.IDPrefix is set', E_USER_WARNING);
 
   37             $id_accumulator =& $context->get(
'IDAccumulator');
 
   38             if (isset($id_accumulator->ids[$id])) 
return false;
 
   43         if (ctype_alpha($id)) {
 
   46             if (!ctype_alpha(@$id[0])) 
return false;
 
   54         $regexp = 
$config->get(
'Attr.IDBlacklistRegexp');
 
   55         if ($regexp && preg_match($regexp, $id)) {
 
   59         if (
$result) $id_accumulator->add($id);