示例#1
0
 function getData($objectType, $objectId, Search_Type_Factory_Interface $typeFactory, array $data = array())
 {
     $title = empty($data['title']) ? null : $data['title']->getValue();
     $title = empty($title) ? '0' : $title;
     $substr = $this->substr;
     $strtoupper = $this->strtoupper;
     $first = $substr($title, 0, 1);
     $first = TikiLib::take_away_accent($first);
     $letter = $strtoupper($first);
     return array('title_initial' => $typeFactory->identifier($letter));
 }
示例#2
0
文件: tikilib.php 项目: rjsmelo/tiki
 /**
  * Remove all "non-word" characters and accents from a string
  * Can be used for DOM elements and preferences etc
  *
  * @static
  * @param string $str
  * @return string cleaned
  */
 static function remove_non_word_characters_and_accents($str)
 {
     return preg_replace('/\\W+/', '_', TikiLib::take_away_accent($str));
 }
示例#3
0
文件: categlib.php 项目: rjsmelo/tiki
 static function cmpcatname($a, $b)
 {
     $a = TikiLib::strtoupper(TikiLib::take_away_accent($a));
     $b = TikiLib::strtoupper(TikiLib::take_away_accent($b));
     return strcmp($a, $b);
 }