Files
static-php-cli/docs/zh/develop/extending/index.md

9 lines
471 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 扩展 StaticPHP
<!-- TODO: 介绍三种扩展方式:
1. 贡献到 core —— 直接修改 src/Package/ 和 config/pkg/。
2. 外部 Registry —— 通过 SPC_REGISTRIES 环境变量指向自定义 spc.registry.yml。
3. Vendor 模式 —— 将类和配置打包为 Composer 库composer require
说明各方式的适用场景。给出最小端到端示例:
一个 Library 类 + 一个配置 YAML + 一个 spc.registry.yml + 运行 spc。 -->