示例#1
0
 private function addHistoricalDataEvent($label, $date, $place)
 {
     $hdDate = '';
     $hdPlace = '';
     if ($date) {
         $hdDate = '<meta itemprop="startDate" content="' . htmlspecialchars(StructuredData::getIsoDate(StructuredData::getDateKey($date))) . '"/>';
     }
     if ($place) {
         $pos = mb_strpos($place, '|');
         if ($pos !== false) {
             $place = mb_substr($place, 0, $pos);
         }
         $hdPlace = '<span itemprop="location" itemscope itemtype="http://schema.org/Place">' . '<meta itemprop="name" content="' . htmlspecialchars($place) . '"/>' . Person::getHistoricalDataAddress($place) . '</span>';
     }
     $this->historicalData .= "<span itemprop=\"{$label}\" itemscope itemtype=\"http://historical-data.org/HistoricalEvent.html\">{$hdDate}{$hdPlace}</span>";
 }