定制 blackcube/dcore 二次开发

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

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

blackcube/dcore

Composer 安装命令:

composer require blackcube/dcore

包简介

CMS core data layer

README 文档

README

License Packagist Version

dcore is the data layer of Blackcube CMS — models, trees, dynamic properties, SEO, translations. JSON Schema + virtual columns, no EAV. Your data stays yours: your own tables, your server, your backups.

It is consumed by two packages on top:

You do not consume dcore directly. Pick dboard for admin, ssr for front, or both.

Where dcore sits

┌────────────────────────┐    ┌────────────────────────┐
│ dboard                 │    │ ssr                    │
│ admin backoffice       │    │ public front           │
│ (editing, CRUD)        │    │ (routing, SEO, handlers)│
└──────────┬─────────────┘    └───────────┬────────────┘
           │                              │
           └──────────────┬───────────────┘
                          ↓
                    ┌──────────┐
                    │  dcore   │  ← data layer
                    └──────────┘
                          ↓
                         DB

Requirements

  • Relational DB with JSON support

Installation

composer require blackcube/dcore

Getting started

dcore is not used alone. Start with a demo app:

Framework Demo repo
Yii3 blackcube/yii-app
Slim blackcube/slim-app
Laravel blackcube/laravel-app

Each demo shows how to wire ssr into its framework, how to write handlers with #[RoutingHandler], and how to consume dcore data.

Why dcore?

Approach Problem
Full-stack CMS Monolith. You want a page? Take the whole engine.
Headless CMS (SaaS) Vendor lock-in. Your data lives elsewhere.
Raw DB access 15 models, 8 pivots, tree management, JSON schema validation — from scratch?
dcore None of the above

Trees without recursion. Content, Tag and Menu are tree-structured via Hazeltree — one query, no cache.

Dynamic properties without EAV. JSON Schema validation, virtual columns, transparent queries via Elastic.

SEO is built in. Per-URL metadata (Xeo), global config (GlobalXeo), sitemap.xml, robots.txt — not bolted on after.

Multilingual by design. Translation groups link Contents across languages. Not an afterthought.

Capabilities per model

Model Tree Dynamic properties Blocs Tags Authors
Content yes yes yes yes yes
Tag yes yes yes no yes
Bloc no yes no no no
Menu yes no no no no
GlobalXeo no yes no no no

Models vs Entities

dcore provides two namespaces for each model:

Namespace Default scope Use case
Blackcube\Dcore\Models\Content none Admin, backoffice
Blackcube\Dcore\Entities\Content ->publishable() Frontend, public rendering

Entities extend Models and override query() to automatically filter by publishable status (active + dates + ancestors). Use Models when you need full access, Entities when you render for visitors.

Architecture

Models

Model Table Description
Content contents Editorial content. Tree-structured, typed, multilingual.
Tag tags Taxonomy. Tree-structured, typed.
Bloc blocs Reusable content brick. Carries dynamic properties.
Menu menus Navigation item. Tree-structured, linked to host and language.
Slug slugs URL (host + path). Can be a redirect.
Host hosts Domain. id=1 = wildcard.
Type types Content/tag type. Carries SSR handler and allowed schemas.
Language languages Available language. String PK.
ElasticSchema elasticSchemas JSON Schema for dynamic properties.
Author authors Author (schema.org Person).
Xeo xeos Per-URL SEO metadata.
GlobalXeo globalXeos Global SEO per host + kind.
Sitemap sitemaps Per-URL sitemap configuration.
Parameter parameters Key-value parameters per domain.
TranslationGroup translationGroups Translation group linking Contents.

Services

Service Role
HandlerDescriptor Path → SSR handler resolution. CMS routing entry point.
PreviewManager Reads preview state (active flag + date simulation) from session.
HazeltreeSlugGenerator Automatic slug generation based on tree position.

Documentation

Detailed documentation:

License

BSD-3-Clause. See LICENSE.md.

Author

Philippe Gaultier philippe@blackcube.io

blackcube/dcore 适用场景与选型建议

blackcube/dcore 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 53 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 04 月 07 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「tree」 「cms」 「seo」 「headless」 「active-record」 「multilingual」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

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

围绕 blackcube/dcore 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2026-04-07