Property | Type | Description | |
---|---|---|---|
$_app | string | Application this tagger is for. | |
$_tagger | Content_Tagger | The tagger | |
$_type_ids | array | Cache of type name => ids from Content | |
$_types | array | The types handled by this tagger. The first entry in the array is taken as the default type if the type parameter is not specified in tagging methods. |
Method | Description | |
---|---|---|
__construct ( ) | Constructor. | |
browseTags ( array $tags, string $user ) : array | Retrieve a set of tags that are related to the specifed set. A tag is related if resources tagged with the specified set are also tagged with the tag being considered. Used to "browse" tagged resources. | |
getCloud ( string $user, integer $limit = 5, boolean $all = false ) : array | Returns the data needed to build a tag cloud based on the passed in user's tag data set. | |
getTagCountsByObjects ( array $ids, integer $type = null ) : array | Get the number of times tags are used within a specific set of objects basically a tag cloud, restricted to objects of a specific type. | |
getTagIds ( string | array $tags ) : array | Get tag ids for the specified tag names. | |
getTagInfo ( array $tags = null, integer $limit = 500, string $type = null, string $user = null ) : array | Returns cloud-like information, but only for a specified set of tags. | |
getTags ( mixed $localId, string $type = null ) : array | Retrieves the tags on given object(s). | |
listTags ( string $token ) : array | Returns tags belonging to the current user beginning with $token. | |
replaceTags ( string $localId, mixed $tags, string $owner, string $content_type = null ) | Tags the given resource with *only* the tags provided, removing any tags that are already present but not in the list. | |
search ( array $tags, array $filter = [] ) : array | Searches for resources that are tagged with all of the requested tags. | |
split ( string $tags ) : array | Split a tag string into an array of tags. | |
tag ( string $localId, mixed $tags, string $owner, string $content_type = null ) | Tags an object with any number of tags. | |
untag ( string $localId, mixed $tags, string $content_type = null ) | Removes a tag from an object. |
public getCloud ( string $user, integer $limit = 5, boolean $all = false ) : array | ||
$user | string | The user whose tags should be included. |
$limit | integer | The maximum number of tags to include. |
$all | boolean | Return all tags, not just tags for the current types. |
return | array | An array of hashes, each containing tag_id, tag_name, and count. |
public getTagInfo ( array $tags = null, integer $limit = 500, string $type = null, string $user = null ) : array | ||
$tags | array | An array of either tag names or ids. |
$limit | integer | Limit results to this many. |
$type | string | The type of resource. |
$user | string | Restrict results to those tagged by $user. |
return | array | An array of hashes, tag_id, tag_name, and count. |
public replaceTags ( string $localId, mixed $tags, string $owner, string $content_type = null ) | ||
$localId | string | The identifier for the object. |
$tags | mixed | Either a tag_id, tag_name, or array of tag_ids. |
$owner | string | The tag owner - should normally be the resource owner. |
$content_type | string | The type of object that $localId represents. |
public tag ( string $localId, mixed $tags, string $owner, string $content_type = null ) | ||
$localId | string | The identifier of the object. |
$tags | mixed | Either a single tag string or an array of tags. |
$owner | string | The tag owner (should normally be the owner of the resource). |
$content_type | string | The type of object we are tagging. |
protected array $_type_ids | ||
return | array |
protected array $_types | ||
return | array |