opengeek/content
最新稳定版本:0.1.0
Composer 安装命令:
composer require opengeek/content
包简介
Simple content management abstractions
README 文档
README
The core package for the Opengeek Content library. Provides backend-agnostic contracts, types, collections, and shared exceptions for content management.
Installation
composer require opengeek/content
What's Included
- Contracts: Generic interfaces for repositories (
ContentRepositoryInterface) and collections (ContentCollectionInterface). - Support:
ContentCollectionTraitfor rapid collection implementation with filtering, sorting, and slicing. - Caching:
CachingContentRepositorydecorator to add PSR-6/Symfony Cache support to any repository. - Article DTO: A pure value container for article data.
- ArticleCollection: A typed, immutable, and searchable collection of
Articleobjects. - ArticleRepositoryInterface: Specialized contract for reading articles.
- ArticlePersisterInterface: Contract for writing articles.
- MarkdownRendererInterface: Implementation-agnostic interface for rendering Markdown to HTML.
- Shared Exceptions:
ContentException,ContentNotFoundException,ContentMappingException, etc.
Usage
This package provides the interfaces you should depend on in your application logic. To actually load or save content, you will need one of the implementation packages:
opengeek/content-markdown: Read-only Markdown file repository.opengeek/content-dbal: Read/write SQL persistence via Doctrine DBAL.opengeek/content-markdown-renderer: HTML rendering for Markdown content.
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 4
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-03-16