Class Tag

Description

<##>

  • version: $Id: Tag.class.php,v 1.5 2007/09/04 20:25:29 adamfranco Exp $
  • license: GNU General Public License (GPL)
  • copyright: Copyright &copy; 2005, Middlebury College
  • since: 11/2/06

Located in /harmoni/core/Tagging/Tag.class.php (line 27)


	
			
Method Summary
object Tag (string $value)
boolean canRemoveFromItem (object $item)
string getCurrentUserId ()
integer getDatabaseIndex ()
object ItemsIterator getItemsForAgentInSystem (mixed $agentId, mixed $system)
object ItemsIterator getItemsForCurrentUserInSystem (mixed $system, integer $max)
object ItemsIterator getItemsInSystem (mixed $system)
object ItemsIterator getItemsWithIdsInSystem (object IdIterator $ids, mixed $system)
integer getOccurances ()
integer getOccurancesForAgent (object Id $agentId)
object TagIterator getRelatedTags ([string $sortBy = TAG_SORT_ALFA], integer $max)
string getValue ()
boolean isItemTagged (object TaggedItem $item)
void removeAllMine ()
void removeFromItems (mixed $items)
void removeFromItemsForAgent (mixed $items, object Id $agentId)
void renameForAgent (object Id $agentId, string $newValue)
void renameForCurrentUser (string $newValue)
void setOccurances (integer $num)
void setOccurancesForAgent (object Id $agentId, integer $num)
object The tagItem (object TaggedItem $item)
object The tagItemForAgent (object TaggedItem $item, object Id $agentId)
Methods
Constructor Tag (line 37)

Constructor

  • since: 11/6/06
  • access: public
object Tag (string $value)
  • string $value: value
canRemoveFromItem (line 435)

Answer true if the current user can remove a tag from an item

  • since: 11/2/06
  • access: public
boolean canRemoveFromItem (object $item)
  • object $item
getCurrentUserId (line 600)

Answer the current user id

  • since: 11/6/06
  • access: public
string getCurrentUserId ()
getCurrentUserIdString (line 615)

Answer the current user id

  • since: 11/6/06
  • access: public
string getCurrentUserIdString ()
getDatabaseIndex (line 585)

Answer the database index

  • since: 11/6/06
  • access: public
integer getDatabaseIndex ()
getItems (line 205)

Answer all items with this tag

  • since: 11/2/06
  • access: public
getItemsForAgent (line 309)

Answer all items with this tag where the tag was added by the given agent

  • since: 11/2/06
  • access: public
object TaggedItemIterator getItemsForAgent (mixed $agentId)
getItemsForAgentInSystem (line 335)

Answer all items with this tag in a particular system

  • since: 11/2/06
  • access: public
object ItemsIterator getItemsForAgentInSystem (mixed $agentId, mixed $system)
getItemsForCurrentUser (line 389)

Answer all items with this tag

  • since: 11/2/06
  • access: public
object TaggedItemIterator getItemsForCurrentUser ()
getItemsForCurrentUserInSystem (line 403)

Answer all items with this tag in a particular system

  • since: 11/2/06
  • access: public
object ItemsIterator getItemsForCurrentUserInSystem (mixed $system, integer $max)
  • integer $max: The maximum number of tags to return. The least frequently used tags will be dropped first. If $max is 0, all tags will be returned.
getItemsInSystem (line 277)

Answer all items with this tag in a particular system

  • since: 11/2/06
  • access: public
object ItemsIterator getItemsInSystem (mixed $system)
getItemsWithIdsInSystem (line 239)

Answer all items with this tag that match a particular list

  • since: 11/2/06
  • access: public
object ItemsIterator getItemsWithIdsInSystem (object IdIterator $ids, mixed $system)
  • object IdIterator $ids
getOccurances (line 130)

Answer the number of occurances of this tag across all users

  • since: 11/7/06
  • access: public
integer getOccurances ()
getOccurancesForAgent (line 164)

Answer the number of occurances of this tag across all users

  • since: 11/7/06
  • access: public
integer getOccurancesForAgent (object Id $agentId)
  • object Id $agentId
getRelatedTags (line 419)

Answer the Tags related to this one. Relation is defined as being attached to the same items as this tag.

  • since: 12/8/06
  • access: public
object TagIterator getRelatedTags ([string $sortBy = TAG_SORT_ALFA], integer $max)
  • string $sortBy: Return tags in alphanumeric order or by frequency of usage.
  • integer $max: The maximum number of tags to return. The least frequently used tags will be dropped first. If $max is 0, all tags will be returned.
getValue (line 56)

Answer the value

  • since: 11/6/06
  • access: public
string getValue ()
isItemTagged (line 363)

Answer true if the current agent has tagged the item

  • since: 11/13/06
  • access: public
boolean isItemTagged (object TaggedItem $item)
removeAllMine (line 568)

Remove the tag everywhere where the current user has added it.

  • since: 11/2/06
  • access: public
void removeAllMine ()
removeFromItems (line 449)

Remove the tag from one or more items, skipping those where authorization is lacking.

  • since: 11/2/06
  • access: public
void removeFromItems (mixed $items)
  • mixed $items: This can be a single Item object, an TaggedItemIterator, or an array of Item objects.
removeFromItemsForAgent (line 493)

Remove the tag from one or more items, skipping those where authorization is lacking.

  • since: 11/2/06
  • access: public
void removeFromItemsForAgent (mixed $items, object Id $agentId)
  • mixed $items: This can be a single Item object, an TaggedItemIterator, or an array of Item objects.
  • object Id $agentId
renameForAgent (line 535)

Rename the tag for the given agent

  • since: 11/27/06
  • access: public
void renameForAgent (object Id $agentId, string $newValue)
  • object Id $agentId
  • string $newValue
renameForCurrentUser (line 557)

Rename the tag for the current user

  • since: 11/27/06
  • access: public
void renameForCurrentUser (string $newValue)
  • string $newValue
setOccurances (line 152)

Set the number of occurances

  • since: 11/7/06
  • access: protected
void setOccurances (integer $num)
  • integer $num
setOccurancesForAgent (line 191)

Set the number of occurances

  • since: 11/7/06
  • access: protected
void setOccurancesForAgent (object Id $agentId, integer $num)
  • object Id $agentId
  • integer $num
tagItem (line 68)

Add this tag to an Item

  • return: item
  • since: 11/6/06
  • access: public
object The tagItem (object TaggedItem $item)
tagItemForAgent (line 100)

Add this tag to an Item for a particular agent

  • return: item
  • since: 11/6/06
  • access: public
object The tagItemForAgent (object TaggedItem $item, object Id $agentId)

Documentation generated on Wed, 19 Sep 2007 10:27:07 -0400 by phpDocumentor 1.3.0RC3