opengeek/content

Simple content management abstractions

Maintainers

Package info

github.com/opengeek/content

pkg:composer/opengeek/content

Statistics

Installs: 1

Dependents: 2

Suggesters: 0

Stars: 0

Open Issues: 0

0.1.0 2026-03-10 23:33 UTC

This package is auto-updated.

Last update: 2026-03-16 03:57:09 UTC


README

PHP ^8.3

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: ContentCollectionTrait for rapid collection implementation with filtering, sorting, and slicing.
  • Caching: CachingContentRepository decorator 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 Article objects.
  • 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.