/**
  * Constructor
  * @param $filterMode integer
  * @param $template string default: DRIVER guidelines 2.0 name template
  *  Possible template variables are %surname%, %suffix%, %prefix%, %initials%, %firstname%
  */
 function NlmNameSchemaPersonStringFilter($filterMode = PERSON_STRING_FILTER_SINGLE, $template = '%surname%%suffix%,%initials% (%firstname%)%prefix%', $delimiter = '; ')
 {
     assert(!empty($template) && is_string($template));
     $this->_template = $template;
     assert(is_string($delimiter));
     $this->_delimiter = $delimiter;
     parent::NlmPersonStringFilter($filterMode);
 }
 /**
  * Constructor
  */
 function PersonStringNlmNameSchemaFilter($assocType, $filterMode = PERSON_STRING_FILTER_SINGLE, $filterTitle = false, $filterDegrees = false)
 {
     assert(in_array($assocType, array(ASSOC_TYPE_AUTHOR, ASSOC_TYPE_EDITOR)));
     $this->_assocType = $assocType;
     $this->_filterTitle = $filterTitle;
     $this->_filterDegrees = $filterDegrees;
     parent::NlmPersonStringFilter($filterMode);
 }
 /**
  * @see Filter::supports()
  */
 function supports(&$input, &$output)
 {
     // We intercept the supports() method so that
     // we can remove et-al entries which are valid but
     // do not conform to the canonical type definition.
     if ($this->getFilterMode() == PERSON_STRING_FILTER_MULTIPLE && is_array($input)) {
         $filteredInput =& $this->removeEtAlEntries($input);
         if ($filteredInput === false) {
             return false;
         }
     } else {
         $filteredInput =& $input;
     }
     return parent::supports($filteredInput, $output);
 }