PHPackages                             boxunsoft/php-framework - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. boxunsoft/php-framework

ActiveLibrary

boxunsoft/php-framework
=======================

PHP MVC Framework

v4.0.1(5y ago)137MITPHPPHP &gt;=7.2CI failing

Since May 20Pushed 4y ago1 watchersCompare

[ Source](https://github.com/boxunsoft/php-framework)[ Packagist](https://packagist.org/packages/boxunsoft/php-framework)[ RSS](/packages/boxunsoft-php-framework/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (8)Versions (20)Used By (0)

PHP框架
=====

[](#php框架)

一个简单的PHP MVC框架

Usage
-----

[](#usage)

### Install

[](#install)

In composer.json

```
...
  "require": {
    "boxunsoft/php-framework": "^4.0"
  },
  "autoload": {
    "psr-4": {
      "Bx\\": "src/"
    }
  }
...
```

### 应用目录

[](#应用目录)

```
env                                         // 环境配置
  |-develop
      |- app.php
  |-test
      |- app.php
  |-release
config                                      // 系统配置
  |- router                                     // 路由
       |- appname.php
public                                      // 入口
  |- appname
       |- index.php
src
  |- App                                    // 多应用
       |- AppName                               // 应用一
           |- Controller                            // 应用控制器
                |- Index.php
           |- View                                  // 应用视图,可自行选择模板引擎
                |- Index.phtml
  |- Model                                  // 存放模型
  |- Library                                // 存放自定义类库

```

#### public/appname/index.php

[](#publicappnameindexphp)

> 目录和文件名必须小写

```
use Alf\Kernel;

$rootPath = (dirname(__DIR__), 3);
require $rootPath . '/vendor/autoload.php';

$Kernel = Kernel::getInstance();
$app->Kernel($rootPath, 'AppName');
```

#### App/AppName/Controller/Index.php

[](#appappnamecontrollerindexphp)

```
namespace Bx\App\AppName\Controller;

use Alf\Controller;

class Index extends Controller
{
    public function main()
    {
        $response = [
            'name' => 'index',
            'message' => 'Index::main()'
        ];
        $this->response()->success($response);
    }
}
```

安全建议
----

[](#安全建议)

```
// 只允许同域名iframe嵌套
header('X-Frame-Options: SAMEORIGIN');
// 禁止浏览器用MIME-sniffing解析资源类型
header('X-Content-Type-Options: nosniff');
// 启用XSS保护
header('X-XSS-Protection: 1; mode=block');

```

引用
--

[](#引用)

> - symfony/http-foundation
> - nikic/fast-route
> - symfony/console

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~45 days

Recently: every ~108 days

Total

18

Last Release

2150d ago

Major Versions

v1.4.2-beta → v2.0.0-stable2019-03-27

v2.4.0 → v3.0.02019-12-17

v3.0.0 → v4.02020-06-23

PHP version history (3 changes)v1.2.0PHP &gt;=5.6

v1.4.1PHP &gt;=7

v4.0PHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/58f52e37e1511a3621d9da7fdec2ce64d281b3050a39ec22470b630aa89480b2?d=identicon)[boxunsoft](/maintainers/boxunsoft)

---

Top Contributors

[![boxunsoft](https://avatars.githubusercontent.com/u/3032202?v=4)](https://github.com/boxunsoft "boxunsoft (55 commits)")

### Embed Badge

![Health badge](/badges/boxunsoft-php-framework/health.svg)

```
[![Health](https://phpackages.com/badges/boxunsoft-php-framework/health.svg)](https://phpackages.com/packages/boxunsoft-php-framework)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[silverstripe/framework

The SilverStripe framework

7213.5M2.5k](/packages/silverstripe-framework)[laravel/nightwatch

The official Laravel Nightwatch package.

3486.1M13](/packages/laravel-nightwatch)[spatie/laravel-export

Create a static site bundle from a Laravel app

646127.9k5](/packages/spatie-laravel-export)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
