public function testCanConstruct()
 {
     $this->assertInstanceOf('\\SMW\\MediaWiki\\ByLanguageCollationMapper', new ByLanguageCollationMapper('Foo'));
     $this->assertInstanceOf('\\SMW\\MediaWiki\\ByLanguageCollationMapper', ByLanguageCollationMapper::getInstance());
     ByLanguageCollationMapper::clear();
 }
 private function getFirstLetterForCategory(SMWQueryResult $res, SMWDataItem $dataItem)
 {
     $sortKey = $dataItem->getSortKey();
     if ($dataItem->getDIType() == SMWDataItem::TYPE_WIKIPAGE) {
         $sortKey = $res->getStore()->getWikiPageSortKey($dataItem);
     }
     return ByLanguageCollationMapper::getInstance()->findFirstLetterForCategory($sortKey);
 }
 private function getFirstLetterForCategory(DataItem $dataItem)
 {
     $sortKey = $dataItem->getSortKey();
     if ($dataItem->getDIType() == DataItem::TYPE_WIKIPAGE) {
         $sortKey = ApplicationFactory::getInstance()->getStore()->getWikiPageSortKey($dataItem);
     }
     return ByLanguageCollationMapper::getInstance()->findFirstLetterForCategory($sortKey);
 }