예제 #1
0
 /**
  * Dedup: Return record title
  *
  * @param bool $forFiling Whether the title is to be used in filing
  * (e.g. sorting, non-filing characters should be removed)
  *
  * @return string
  */
 public function getTitle($forFiling = false)
 {
     $title = trim((string) $this->doc->title);
     $title = MetadataUtils::stripTrailingPunctuation($title);
     if ($forFiling) {
         $title = MetadataUtils::stripLeadingPunctuation($title);
         $title = MetadataUtils::stripLeadingArticle($title);
         // Again, just in case stripping the article affected this
         $title = MetadataUtils::stripLeadingPunctuation($title);
         $title = mb_strtolower($title, 'UTF-8');
     }
     return $title;
 }