Overview

Packages

  • Kronolith
  • None

Classes

  • Kronolith
  • Kronolith_Ajax_Application
  • Kronolith_Ajax_Imple_ContactAutoCompleter
  • Kronolith_Ajax_Imple_Embed
  • Kronolith_Ajax_Imple_TagActions
  • Kronolith_Ajax_Imple_TagAutoCompleter
  • Kronolith_Api
  • Kronolith_Calendar
  • Kronolith_Calendar_External
  • Kronolith_Calendar_External_Tasks
  • Kronolith_Calendar_Holiday
  • Kronolith_Calendar_Internal
  • Kronolith_Calendar_Remote
  • Kronolith_Calendar_Resource
  • Kronolith_Calendars_Base
  • Kronolith_Calendars_Default
  • Kronolith_Calendars_Kolab
  • Kronolith_Day
  • Kronolith_Driver
  • Kronolith_Driver_Holidays
  • Kronolith_Driver_Horde
  • Kronolith_Driver_Ical
  • Kronolith_Driver_Kolab
  • Kronolith_Driver_Mock
  • Kronolith_Driver_Resource
  • Kronolith_Driver_Sql
  • Kronolith_Event
  • Kronolith_Event_Holidays
  • Kronolith_Event_Horde
  • Kronolith_Event_Ical
  • Kronolith_Event_Kolab
  • Kronolith_Event_Resource
  • Kronolith_Event_Sql
  • Kronolith_Exception
  • Kronolith_Factory_Calendars
  • Kronolith_Factory_Geo
  • Kronolith_Form_CreateCalendar
  • Kronolith_Form_CreateResource
  • Kronolith_Form_CreateResourceGroup
  • Kronolith_Form_DeleteCalendar
  • Kronolith_Form_DeleteResource
  • Kronolith_Form_DeleteResourceGroup
  • Kronolith_Form_EditCalendar
  • Kronolith_Form_EditRemoteCalendar
  • Kronolith_Form_EditResource
  • Kronolith_Form_EditResourceGroup
  • Kronolith_Form_SubscribeRemoteCalendar
  • Kronolith_Form_UnsubscribeRemoteCalendar
  • Kronolith_FreeBusy
  • Kronolith_FreeBusy_View
  • Kronolith_FreeBusy_View_Day
  • Kronolith_FreeBusy_View_Month
  • Kronolith_FreeBusy_View_Week
  • Kronolith_FreeBusy_View_Workweek
  • Kronolith_Geo_Base
  • Kronolith_Geo_Mysql
  • Kronolith_Geo_Sql
  • Kronolith_LoginTasks_SystemTask_Upgrade
  • Kronolith_LoginTasks_Task_PurgeEvents
  • Kronolith_Notification_Listener_AjaxStatus
  • Kronolith_Resource
  • Kronolith_Resource_Base
  • Kronolith_Resource_Group
  • Kronolith_Resource_Single
  • Kronolith_Storage
  • Kronolith_Storage_Kolab
  • Kronolith_Storage_Sql
  • Kronolith_Tagger
  • Kronolith_Test
  • Kronolith_View_Day
  • Kronolith_View_DeleteEvent
  • Kronolith_View_EditEvent
  • Kronolith_View_Event
  • Kronolith_View_ExportEvent
  • Kronolith_View_Month
  • Kronolith_View_Week
  • Kronolith_View_WorkWeek
  • Kronolith_View_Year
  • Overview
  • Package
  • Class
  • Tree

Class Kronolith_Tagger

Kronolith interface to the Horde_Content tagger

Copyright 2009-2012 Horde LLC (http://www.horde.org/)

Package: Kronolith
Author: Michael J. Rubinsky mrubinsk@horde.org
Located at Tagger.php
Methods summary
public Kronolith_Tagger
# __construct( )

Constructor.

Constructor.

Returns

Kronolith_Tagger
public
# tag( string $localId, mixed $tags, string $owner, string $content_type = 'event' )

Tags a kronolith object with any number of tags.

Tags a kronolith object with any number of tags.

Parameters

$localId
The identifier of the kronolith object.
$tags
<p>Either a single tag string or an array of tags.</p>
$owner
<p>The tag owner (should normally be the owner of the resource).</p>
$content_type
<p>The type of object we are tagging (event/calendar).</p>
public array
# getTags( mixed $localId, string $type = 'event' )

Retrieves the tags on given object(s).

Retrieves the tags on given object(s).

Parameters

$localId
<p>Either the identifier of the kronolith object or an array of identifiers.</p>
$type
The type of object $localId represents.

Returns

array
A tag_id => tag_name hash, possibly wrapped in a localid hash.
public
# untag( string $localId, mixed $tags, string $content_type = 'event' )

Removes a tag from a kronolith object.

Removes a tag from a kronolith object.

Removes all tags - regardless of the user that added the tag.

Parameters

$localId
The kronolith object identifier.
$tags
<p>Either a tag_id, tag_name or an array of ids or names to remove.</p>
$content_type
The type of object that $localId represents.
public
# replaceTags( string $localId, mixed $tags, string $owner, mixed $content_type = 'event' )

Tags the given resource with only the tags provided, removing any tags that are already present but not in the list.

Tags the given resource with only the tags provided, removing any tags that are already present but not in the list.

Parameters

$localId
The identifier for the kronolith object.
$tags
Either a tag_id, tag_name, or array of tag_ids.
$owner
<p>The tag owner - should normally be the resource owner.</p>
$content_type
type of object that $localId represents.
public A
# search( array $tags, array $filter = array() )

Searches for resources that are tagged with all of the requested tags.

Searches for resources that are tagged with all of the requested tags.

Parameters

$tags
Either a tag_id, tag_name or an array.
$filter
<p>Array of filter parameters. - type (string) - only return either events or calendars, not both. - user (array) - only include objects owned by these users. - calendar (array) - restrict to events contained in these calendars.</p>

Returns

A

hash of 'calendars' and 'events' that each contain an array of calendar_ids and event_uids respectively.

public A
# listTags( string $token )

Returns tags belonging to the current user beginning with $token.

Returns tags belonging to the current user beginning with $token.

Used for autocomplete code.

Parameters

$token
The token to match the start of the tag with.

Returns

A
tag_id => tag_name hash
public An
# getCloud( string $user, integer $limit = 5 )

Returns the data needed to build a tag cloud based on the passed in user's tag data set.

Returns the data needed to build a tag cloud based on the passed in user's tag data set.

Parameters

$user
The user whose tags should be included.
$limit
The maximum number of tags to include.

Returns

An
array of hashes, each containing tag_id, tag_name, and count.
public array
# getTagInfo( array $tags = null, integer $limit = 500, string $type = null, string $user = null )

Returns cloud-like information, but only for a specified set of tags.

Returns cloud-like information, but only for a specified set of tags.

Parameters

$tags
An array of either tag names or ids.
$limit
Limit results to this many.
$type
The type of resource (event, calendar, null).
$user
Restrict results to those tagged by $user.

Returns

array
An array of hashes, tag_id, tag_name, and count.

Throws

Ansel_Exception
API documentation generated by ApiGen