PHPackages                             postor/yii2-for-sae - 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. postor/yii2-for-sae

ActiveYii2-extension

postor/yii2-for-sae
===================

The adapt for Yii2 framework to run on sina app engine.

0.0.5(10y ago)2617311BSD-3-ClausePHP

Since May 27Pushed 10y ago7 watchersCompare

[ Source](https://github.com/postor/yii2-for-sae)[ Packagist](https://packagist.org/packages/postor/yii2-for-sae)[ RSS](/packages/postor-yii2-for-sae/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (1)Versions (5)Used By (0)

Yii2 adapt for sina app engine.这是针对yii2在新浪sae上运行做的适配
====================================================

[](#yii2-adapt-for-sina-app-engine这是针对yii2在新浪sae上运行做的适配)

This is using saestorage for asset publishing.使用saestorage实现资源发布功能

Installation安装步骤：
-----------------

[](#installation安装步骤)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).推荐使用composer

Either run命令行输入并运行

```
php composer.phar require "postor/yii2-for-sae" "*"

```

or add或者在配置文件composer.json中添加

```
"postor/yii2-for-sae": "*"

```

to the require section of your `composer.json` file.

Usage使用方法:
----------

[](#usage使用方法)

1.create a saestorage domain named 'assets' in SAE admin, this can be another name but need to be configed as assetDomain.

在sae后台开启storage，并建立一个domain叫做‘assets’，如果使用别的名字需要在配置中使用assetDomain来配置

2.config 配置

```
// config/web.php
// change all file operations to db or seastorage or kvdb
//修改所有文件操作到数据库，或者saestorage或者kvdb
...
    'components' => [
        //cache to db缓存到db
        'cache' => [
            'class' => 'yii\caching\DbCache',
        ],
        //sea mysql配置sae的mysql
        'db' => [
            'class' => 'yii\db\Connection',
            'dsn' => 'mysql:host='.SAE_MYSQL_HOST_M.';port='.SAE_MYSQL_PORT.';dbname='.SAE_MYSQL_DB,
            'username' => SAE_MYSQL_USER,
            'password' => SAE_MYSQL_PASS,
            'charset' => 'utf8',
            'tablePrefix' => 'scd_',
        ],
        //use seastorage for assets使用sae发布资源
        'assetManager' =>[
        	'class'=>'postor\sae\SaeAssetManager',
        	'assetDomain'=>'assets',
        	'converter' => [
        		'class' => 'yii\web\AssetConverter',
        	],
        ],
        //log to db日志也修改到db
        'log' => [
            'traceLevel' => YII_DEBUG ? 3 : 0,
            'targets' => [
                [
                    'class' => 'yii\log\DbTarget',
                    'levels' => ['error', 'warning'],
                ],
            ],
        ],
    ]
```

demo:

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.5% 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 ~9 days

Total

4

Last Release

3982d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f742eda91b8f1444a29754d8441c1f939cab8a7c223d243ad2715e2b447d4a1b?d=identicon)[postor](/maintainers/postor)

---

Top Contributors

[![postor](https://avatars.githubusercontent.com/u/699002?v=4)](https://github.com/postor "postor (21 commits)")[![luxiongwei](https://avatars.githubusercontent.com/u/11358596?v=4)](https://github.com/luxiongwei "luxiongwei (1 commits)")

---

Tags

yii2yii 2saesinaappsaestorageadapt

### Embed Badge

![Health badge](/badges/postor-yii2-for-sae/health.svg)

```
[![Health](https://phpackages.com/badges/postor-yii2-for-sae/health.svg)](https://phpackages.com/packages/postor-yii2-for-sae)
```

###  Alternatives

[softark/yii2-dual-listbox

Bootstrap Dual Listbox Widget for Yii 2

20144.4k11](/packages/softark-yii2-dual-listbox)

PHPackages © 2026

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