Author: Frederic Guillot
Inheritance: implements PicoFeed\Parser\ParserInterface
Esempio n. 1
0
 public function testLangRTL()
 {
     $this->assertFalse(Parser::isLanguageRTL('fr-FR'));
     $this->assertTrue(Parser::isLanguageRTL('ur'));
     $this->assertTrue(Parser::isLanguageRTL('syr-**'));
     $this->assertFalse(Parser::isLanguageRTL('ru'));
 }
Esempio n. 2
0
function is_rtl(array $item)
{
    return !empty($item['rtl']) || \PicoFeed\Parser\Parser::isLanguageRTL($item['language']);
}
Esempio n. 3
0
 protected function determineRtl($parsedItem, $parsedFeed)
 {
     $itemLang = $parsedItem->getLanguage();
     $feedLang = $parsedFeed->getLanguage();
     if ($itemLang) {
         return Parser::isLanguageRTL($itemLang);
     } else {
         return Parser::isLanguageRTL($feedLang);
     }
 }