lizzyman04/fluxor
Composer 安装命令:
composer require lizzyman04/fluxor
包简介
A lightweight PHP MVC engine with file-based routing and elegant Flow syntax.
关键字:
README 文档
README
The lightweight PHP MVC core that powers Fluxor framework - File-based routing, elegant Flow syntax, and zero bloat.
📦 What is Fluxor Core?
Fluxor Core is the engine behind the Fluxor PHP framework - a minimal, elegant, and powerful MVC core designed for developers who want simplicity without sacrificing functionality.
Unlike monolithic frameworks, Fluxor Core gives you:
- 🚀 Blazing fast performance (boot under 10ms)
- 📦 Minimal dependencies - routing is powered by the standalone, zero-dependency
lizzyman04/file-routerpackage; nothing else - 🔍 Transparent code - no magic, you can read everything
- 🎯 File-based routing inspired by Next.js
- 💎 Elegant Flow syntax for route definitions
- 🔒 Config locking to protect critical settings
- 🌐 Built-in CORS support (global + per-route)
🚀 Quick Start
composer require lizzyman04/fluxor
<?php require 'vendor/autoload.php'; $app = new Fluxor\Core\App(); $app->run();
🎯 Imports
Import core classes from their namespaces (PSR-4 autoloaded):
use Fluxor\Core\App; use Fluxor\Core\Http\Request; use Fluxor\Core\Http\Response; use Fluxor\Core\Routing\Flow; use Fluxor\Core\View;
Breaking change in 2.0: the short-name aliases
Fluxor\Flow,Fluxor\App,Fluxor\Response, etc. were removed. Use the fully-qualified namespaces above.
💡 Core Concepts
Application Instance
$app = new Fluxor\Core\App(); $basePath = $app->getBasePath(); // Auto-detected! $baseUrl = $app->getBaseUrl(); // Auto-detected!
Global CORS Configuration
$app = new Fluxor\Core\App(); $app->cors()->allowOrigin('*')->enable(); $app->run();
File-based Routing
The directory structure is the route table. URL matching (dynamic [id],
catch-all [...slug], route groups, the compiled-route cache) is handled by
the standalone lizzyman04/file-router
engine; Fluxor adds the Flow syntax and dispatch on top. The route-file
syntax below is unchanged.
// app/router/users/[id].php use Fluxor\Core\Routing\Flow; use Fluxor\Core\Http\Response; Flow::GET()->do(function($req) { $userId = $req->param('id'); return Response::success(['user' => $userId]); });
Router with Middleware
$router = $app->getRouter(); $router->addMiddleware('auth', function($request) { if (!$request->isAuthenticated()) { return Fluxor\Core\Http\Response::redirect('/login'); } });
Request & Response
use Fluxor\Core\Http\Response; $id = $request->param('id'); $email = $request->input('email'); $token = $request->bearerToken(); return Response::json(['user' => $user]); return Response::view('profile', ['user' => $user]);
Flow Syntax
use Fluxor\Core\Routing\Flow; // Simple route Flow::GET()->do(fn($req) => 'Hello World'); // Controller binding Flow::POST()->to(UserController::class, 'store'); // Middleware Flow::use(fn($req) => $req->isAuthenticated() ? null : redirect('/login'));
View System
// In controller return Response::view('home', ['title' => 'Home']); // In view (home.php) View::extend('layouts/main'); View::section('content'); <h1><?= View::e($title) ?></h1> View::endSection();
Global Helpers
// Environment variables $debug = env('APP_DEBUG', false); $dbName = env('DB_NAME', 'database'); // Path helpers $root = base_path(); $url = base_url('api/users'); $asset = asset('css/app.css'); // HTTP helpers abort(404, 'Not Found'); return redirect('/dashboard'); // Debug helpers dump($user); dd($data); // Dump and die
📚 Documentation
Full documentation available at: 👉 https://fluxor.tudocomlizzyman.com
The documentation includes:
- Installation guide
- File-based routing
- Flow syntax reference
- Views and layouts
- Controllers and middleware
- Environment configuration
- Complete API reference with helper functions
📄 License
MIT License - see LICENSE file for details.
Fluxor - Build elegant PHP applications with joy! 🎉
lizzyman04/fluxor 适用场景与选型建议
lizzyman04/fluxor 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 111 次下载、GitHub Stars 达 15, 最近一次更新时间为 2026 年 03 月 17 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「framework」 「flow」 「php」 「api」 「mvc」 「router」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 lizzyman04/fluxor 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 lizzyman04/fluxor 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 lizzyman04/fluxor 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
PHP Framework HLEB2 is the foundation of the web application. Provides ease of development and application performance.
Put images nicley in a row
Create link to static resources with cache-breaking segment based on md5 of the file
getting and sending flow
This package provides your visitors the possibility to comment stuff and discuss together.
Ready to use blog package
统计信息
- 总下载量: 111
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 15
- 点击次数: 25
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-03-17