refkinscallv/framework
Composer 安装命令:
composer create-project refkinscallv/framework
包简介
Simple, Lightweight and Modular traditional PHP Framework. With MVC, Routing and Query Builder/ORM
README 文档
README
This is a lightweight PHP framework crafted for developers seeking a straightforward and efficient tool for building web applications. Focused on simplicity and performance, it provides all the essential features without unnecessary complexity.
Table of Contents
Features
This framework offers a rich set of features to help you build robust, scalable web applications:
- MVC Architecture: Organize your application using the Model-View-Controller (MVC) pattern, keeping business logic, user interface, and data models separated.
- Query Builder / ORM: Interact with your database effortlessly with an intuitive query builder or object-relational mapping (ORM).
- Routing: Define clean and readable URL routes with a powerful routing system.
- Cookie Management: Simplify cookie handling with an easy-to-use API for setting and retrieving cookies.
- Crypto: Enhance data security with built-in encryption and decryption methods.
- Mailer: Send emails easily using the built-in mailer component.
- Session Management: Handle user sessions securely and efficiently.
- Form Validation: Validate user input with a flexible and extendable form validation system.
- HTTP Request and Response: Manage HTTP requests and responses with a simple, consistent API.
Installation
Install the framework by cloning the repository or using Composer.
Cloning the Repository
To get started, clone the repository with:
git clone https://github.com/refkinscallv/framework.git
Using Composer
Alternatively, install via Composer:
composer create-project refkinscallv/framework
Configuration and Setup
After installing the framework, follow these steps to configure and set up your environment:
-
Build the Project
Compile and prepare your project by running:
php fw build
-
Update the Project (Optional)
To update your project, run:
php fw update
-
Start the Built-In PHP Server
Run your application using PHP’s built-in server with:
php fw serve
This will start the server, allowing you to view your application in a web browser.
Defining Routes
This framework uses a straightforward routing system. Routes are defined in app/Routes/Route.php. Here’s an example:
<?php use FW\Router\Route; Route::register([ __DIR__ ."/module/api" ]); Route::set404(function() { echo "Custom Not Found Page"; }); Route::get("/", function() { echo "Hello World"; }); // Add more routes here
- Module Registration: Register modules with
Route::register(). - Custom 404 Handling: Set custom handlers for 404 errors using
Route::set404(). - Defining GET Routes: Use
Route::get()to define GET routes.
Contributing
Contributions are welcome! To contribute:
- Fork the Repository: Create a personal fork on GitHub.
- Clone Your Fork: Clone your forked repository to your machine.
- Create a Feature Branch: Start a new branch for your feature or bug fix.
- Make Changes: Implement changes in your feature branch.
- Submit a Pull Request: Push changes to your forked repository and submit a pull request to the main repository.
For more detailed contribution guidelines, refer to the CONTRIBUTING.md file.
License
This framework is open-source and licensed under the MIT License. You’re free to use, modify, and distribute it in your projects.
Thank you for choosing this framework! We hope it helps you build projects quickly and efficiently. If you encounter issues or have suggestions, feel free to open an issue or contribute to the project.
refkinscallv/framework 适用场景与选型建议
refkinscallv/framework 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 14 次下载、GitHub Stars 达 1, 最近一次更新时间为 2024 年 10 月 26 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 refkinscallv/framework 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 refkinscallv/framework 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 14
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 12
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-10-26