定制 horde/content 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

horde/content

最新稳定版本:v3.0.0beta2

Composer 安装命令:

composer require horde/content

包简介

Tagging application

关键字:

README 文档

README

Content is the Horde tagging engine. It stores tags, references to the objects they are applied to and keys for the users who applied them. Any Horde application can tag arbitrary objects (contacts, events, tasks, bookmarks, etc.) through a shared vocabulary. This enables cross-application tag searches and tag clouds.

Core classes:

  • Content_Tagger -- The main API for tagging, untagging, searching, and building tag clouds.
  • Content_Types_Manager / Content_Objects_Manager / Content_Users_Manager -- manage the type, object, and user registries that Content_Tagger depends on.

Application integration

Horde applications do not call the HTTP endpoints directly. Instead each app defines a thin wrapper that extends Horde_Core_Tagger and declares its app name and supported object types:

class Nag_Tagger extends Horde_Core_Tagger
{
    protected $_app = 'nag';
    protected $_types = ['task'];
}

Horde_Core_Tagger obtains a Content_Tagger instance via the injector and delegates the heavy lifting. Apps that follow this pattern include Kronolith (events), Turba (contacts), Nag (tasks), Mnemo (notes), Trean (bookmarks), Ansel (photos/galleries), and Jonah (stories).

The most commonly used operations are tag(), untag(), replaceTags(), getTags(), getObjects(), and getTagCloud().

HTTP endpoints

Content also exposes a set of PSR-15 request handlers mounted under the application's web root. All endpoints currently require a Horde session (default middleware stack).

PLANNED FEATURE: Allow making some endpoints public by opt-in.

GET /tags

Search or list tags. Returns all tags when called without parameters.

Parameter Description
q Starts-with search on tag text
typeId Restrict to tags on objects of this type
userId Restrict to tags applied by this user
objectId Restrict to tags on this object
limit Maximum number of results
offset Result offset for pagination
format json (default), html, atom, or rss

GET /tags/recent

Most recently used tags.

Parameter Description
limit Maximum number of tags (default 10)
offset Result offset for pagination
typeId Restrict to tags on objects of this type
userId Restrict to tags applied by this user
format json (default), html, atom, or rss

POST /tag

Tag an object. Accepts POST or PUT.

Parameter Required Description
userId yes User applying the tag
objectId yes Object identifier
tags yes Tag name(s) to apply
typeId yes Object type

Returns 204 No Content on success.

POST /untag

Remove a tag from an object. Accepts POST or DELETE.

Same parameters as /tag. Returns 204 No Content on success.

统计信息

  • 总下载量: 1.17k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 8
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 5
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-2-Clause
  • 更新时间: 2023-10-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固