定制 ennerd/fubber-framework 二次开发

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

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

ennerd/fubber-framework

最新稳定版本:1.3.4

Composer 安装命令:

composer require ennerd/fubber-framework

包简介

Fubber Framework by Ennerd.com. Create web applications that share the same source hosted by Apache, Nginx or React PHP.

README 文档

README

Fubber is a modern PHP application framework designed around developer productivity, extensibility, and a clean separation of concerns. It provides powerful building blocks such as controllers, configuration, dependency injection, routing, and instrumentation for performance and debugging.

This README gives you an eagle’s‑eye view of the framework. For deeper dives, see the linked documents in the docs/ folder.

✨ Features

  • Controller‑centric architecture – define routes, lifecycle hooks, and cron jobs in one place.
  • Configuration system – layered config loading with environment awareness.
  • Dependency injection container – flexible, annotation‑driven DI.
  • Routing – expressive HTTP routing with middleware and exception mapping.
  • Instrumentation – built‑in tools for profiling, benchmarking, and exception annotation.
  • Bundles – modular extension system with manifests for reusable packages.
  • Developer ergonomics – sensible defaults, modern helper methods, and PSR‑compatible interfaces.

🏗️ High-Level Architecture

                        ┌────────────────────┐
                        │   Application      │
                        │   (Your Code)      │
                        └─────────┬──────────┘
                                  │
                        ┌─────────▼──────────┐
                        │      Kernel        │
                        │  (phases, hooks)   │
                        └─────────┬──────────┘
                                  │
     ┌───────────────┬────────────┴─────────────┬───────────────┐
     │               │                          │               │
┌────▼────┐   ┌──────▼──────┐          ┌────────▼────────┐ ┌─────▼─────┐
│ Config  │   │ Controllers │          │ Container       │ │ Http      │
│ Env     │   │ Lifecycle   │          │ (DI, Services)  │ │ Router    │
└────┬────┘   └──────┬──────┘          └────────┬────────┘ └─────┬─────┘
     │               │                          │                │
     ▼               ▼                          ▼                ▼
 .env + php   Routes, init(), call()      Services, scopes   Middleware,
  settings      + Cron tasks               Factories         Exception handling

📂 Documentation

🚀 Quick Example

use Fubber\Kernel\AbstractController;

final class HelloController extends AbstractController
{
    public function routes(): array {
        return [
            "GET /hello" => fn() => $this->json(["message" => "Hello, World!"]),
        ];
    }
}

🔗 Next Steps

Core Guides

  1. Getting Started

    • Installation & Requirements
    • Directory Structure
    • First Controller
  2. Kernel & Phases

    • Boot Process
    • Phase Handlers
    • Hooks & Triggers
  3. Configuration

    • Environment (.env)
    • Config files (config/*.php)
    • Adding config paths
  4. Controllers

    • Lifecycle (load, init, call)
    • Static vs Instance controllers
    • Adding Routes
  5. HTTP Layer

    • Router
    • Middleware (PSR-15)
    • Exception Handling
  6. Dependency Injection

    • Services & Scopes
    • Autowiring
    • Container API

Advanced Topics

  • Cron Jobs
  • Instrumentation (logging, metrics, debugging)
  • Extending the Kernel (KernelExtension, custom phases)
  • Microcache for lightweight caching
  • FileSystem abstraction

Reference

  • API Docs (autogenerated)
  • Examples & Recipes

🗺️ Next Steps

🚀 Philosophy

Fubber Framework embraces:

  • Explicit over implicit — lifecycle and phases are visible and traceable.
  • Convention with escape hatches — config drives the app, but you can override at will.
  • Performance awareness — instrumentation and microcache are built in.
  • Security by default — environment variables are scrubbed after import, and sensitive files stay outside the web root.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-11-06