定制 clutch-property-mgmt/content-domain 二次开发

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

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

clutch-property-mgmt/content-domain

Composer 安装命令:

composer require clutch-property-mgmt/content-domain

包简介

Shared CMS domain models for PHP SSR apps. Provides pure, framework-agnostic entities (Page, PageSection, Review, SeoMeta, Navigation, etc.) with attribute-based validation via [phpolar/model]. Designed for Clean Architecture: no infrastructure, no PDO—just content-focused domain objects.

README 文档

README

Shared CMS domain models for PHP SSR apps. Provides pure, framework-agnostic entities (Page, PageSection, Review, SeoMeta, Navigation, etc.) with attribute-based validation via [phpolar/model]. Designed for Clean Architecture: no infrastructure, no PDO—just content-focused domain objects.

Table of Contents

Goals

  • Pure domain for CMS/content concerns
  • Reusable across storefront (read-only) and storefront-admin (read-write)
  • Stable contracts with small, composable objects
  • Validation via attributes using phpolar/model
  • Zero infrastructure: no PDO, no frameworks, no I/O side effects

What’s Included

  • Core CMS entities and value objects:
    • Page, PageSection, Block, SeoMeta, Slug, Navigation, MenuItem, Review (example set)
  • Attribute-based rules for validation/normalization
  • Minimal helpers for content-domain business rules (publishability, visibility windows, etc.) that do not perform I/O

What’s Not Included

  • No repositories, PDO, or persistence code
  • No controllers or framework glue
  • No caching, logging, HTTP, or config loading

Keep infrastructure in the application layer (e.g., storefront, storefront-admin). This package should remain framework- and storage-agnostic.

Install

composer require clutch-property-mgmt/content-domain

Requires PHP 8.2+ and phpolar/model.

Usage

Entities

<?php
use ContentDomain\Content\Page;
use ContentDomain\Content\SeoMeta;
use ContentDomain\Content\PageSection;

$seo = new SeoMeta(title: 'Apartments in Midtown', description: 'Spacious, modern units', keywords: ['apartments','midtown']);
$page = new Page(
    id: null,
    slug: 'midtown-apartments',
    title: 'Midtown Apartments',
    sections: [ new PageSection('hero', ['headline' => 'Live in Midtown']) ],
    seo: $seo,
    publishedAt: new \DateTimeImmutable('2025-01-01T00:00:00Z'),
);

Validation with phpolar/model

Use PHP attributes from phpolar/model on properties to enforce constraints.

<?php
use Phpolar\Model\Attributes as Assert;

final class Slug
{
    public function __construct(
        #[Assert\NotBlank]
        #[Assert\Pattern('/^[a-z0-9-]+$/')]
        public readonly string $value,
    ) {}
}

Immutability / Value semantics

Favor immutable value objects (e.g., Slug, SeoMeta) and explicit methods to derive new instances rather than in-place mutation. Entities may carry identifiers; value objects should not.

Directory & Namespaces

src/
  Content/
    Page.php
    PageSection.php
    SeoMeta.php
    Slug.php
    Review.php
    Navigation.php
    MenuItem.php
  Validation/
    (attribute helpers, if any)
  • Root namespace: ContentDomain\\...
  • Public API is limited to types under ContentDomain\Content and documented helpers.

Versioning

  • Semantic Versioning (SemVer): MAJOR.MINOR.PATCH
  • Breaking changes only in MAJOR releases

Contributing

  1. Fork and create a feature branch
  2. Add tests and docs
  3. Ensure CI passes (coding standards, static analysis, unit tests)
  4. Open a PR with a clear description and rationale

License

MIT License. See LICENSE for details.

clutch-property-mgmt/content-domain 适用场景与选型建议

clutch-property-mgmt/content-domain 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 147 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 02 月 19 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 clutch-property-mgmt/content-domain 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 clutch-property-mgmt/content-domain 我们能提供哪些服务?
定制开发 / 二次开发

基于 clutch-property-mgmt/content-domain 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 147
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 38
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: proprietary
  • 更新时间: 2026-02-19