Kronolith::getTagger PHP Méthode

getTagger() public static méthode

Obtain a Kronolith_Tagger instance
public static getTagger ( ) : Kronolith_Tagger
Résultat Kronolith_Tagger
    public static function getTagger()
    {
        if (empty(self::$_tagger)) {
            self::$_tagger = new Kronolith_Tagger();
        }
        return self::$_tagger;
    }

Usage Example

Exemple #1
0
 /**
  * Syncronizes tags from the tagging backend with the task storage backend,
  * if necessary.
  *
  * @param array $tags  Tags from the tagging backend.
  */
 public function synchronizeTags($tags)
 {
     if (isset($this->_internaltags)) {
         $lower_internaltags = array_map('Horde_String::lower', $this->_internaltags);
         $lower_tags = array_map('Horde_String::lower', $tags);
         usort($lower_tags, 'strcoll');
         if (array_diff($lower_internaltags, $lower_tags)) {
             Kronolith::getTagger()->replaceTags($this->uid, $this->_internaltags, $this->_creator, Kronolith_Tagger::TYPE_EVENT);
         }
         $this->_tags = $this->_internaltags;
     } else {
         $this->_tags = $tags;
     }
 }
All Usage Examples Of Kronolith::getTagger