phpnomad/core
Composer 安装命令:
composer require phpnomad/core
包简介
The central PHPNomad orchestration package — bundles essential dependencies for building platform-agnostic PHP applications
README 文档
README
phpnomad/core is the entry-point package for PHPNomad, a platform-agnostic PHP framework. Installing it pulls in the nine packages every PHPNomad application needs and adds a CoreInitializer plus seven static facades (Cache, Event, Logger, Template, UrlResolver, PathResolver, InstanceProvider) that wire them together.
PHPNomad has been running in production for years, powering Siren, several MCP servers, and other client systems. It's small, opinionated, and built by developers who actually use it.
Installation
composer require phpnomad/core
Quick Start
Compose a Bootstrapper with CoreInitializer and any other initializers, then call load().
<?php use PHPNomad\Core\Bootstrap\CoreInitializer; use PHPNomad\Di\Container\Container; use PHPNomad\Loader\Bootstrapper; $container = new Container(); (new Bootstrapper( $container, new CoreInitializer(), new MyAppInitializer(), // Add platform initializers (e.g. WordPressInitializer) and your own initializers here ))->load();
CoreInitializer is the foundation, not the whole stack. A real application composes it with platform integrations like WordPressInitializer, your own initializers, and any other libraries you pull in. The bootstrapping guide at phpnomad.com walks through the full pattern.
What's Included
Bundled packages
phpnomad/core pulls in nine packages that form the framework's foundation:
phpnomad/di: dependency injection containerphpnomad/loader: bootstrapping and initializer loadingphpnomad/event: event broadcasting and listeningphpnomad/cache: caching abstractionphpnomad/logger: logging abstractionphpnomad/rest: REST controller and middleware frameworkphpnomad/singleton: singleton trait for facades and shared statephpnomad/facade: base classes for static-bound service facadesphpnomad/utils: array helpers, list filters, and processors
Facades
On top of those packages, core adds seven static facades for the services you reach for most often:
Cache: get, set, and load-or-compute through the cache strategyEvent: broadcast events and attach or detach listenersLogger: log messages through the configured logger strategyTemplate: render templates through the template strategyUrlResolver: resolve URLs for assets and routesPathResolver: resolve filesystem paths the same wayInstanceProvider: pull instances out of the DI container statically
Documentation
Full documentation lives at phpnomad.com, including the bootstrapping guide, the datastore pattern, and per-package references for each of the packages core bundles.
Contributing
PHPNomad is built and maintained by Alex Standiford, who's been using it for years to ship real software. Contributions from developers who care about clean architecture and platform-agnostic design are genuinely welcome.
Good places to start include opening an issue about what you're trying to build, fixing a bug you hit in production, or improving documentation for a package you understand well. Each PHPNomad package lives in its own repo, so issues and pull requests go to the specific package you're working on. If you want orientation before picking something, opening a discussion issue on phpnomad/core is a fine place to start.
License
MIT, see LICENSE.txt for the full text.
phpnomad/core 适用场景与选型建议
phpnomad/core 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 5.12k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 12 月 18 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 phpnomad/core 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 phpnomad/core 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 5.12k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 8
- 依赖项目数: 4
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-12-18