/** * Imple handler. * * @param Horde_Variables $vars A variables object. * * @return stdClass The top 10 most popular tags for the current user. */ protected function _handle(Horde_Variables $vars) { $tagger = new Trean_Tagger(); $result = new stdClass(); $result->tags = array(); $tags = $tagger->getCloud($GLOBALS['registry']->getAuth(), 10, true); foreach ($tags as $tag) { $results->tags[] = $tag['tag_name']; } return $results; }
/** */ protected function _handleAutoCompleter($input) { $tagger = new Trean_Tagger(); return array_values($tagger->listTags($input)); }