2017 © Pedro Peláez
 

yii2-extension yii2-for-sae

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

image

postor/yii2-for-sae

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

  • Wednesday, February 24, 2016
  • by postor
  • Repository
  • 7 Watchers
  • 27 Stars
  • 114 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 12 Forks
  • 1 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

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

This is using saestorage for asset publishing.使用saestorage实现资源发布功能, (*1)

Installation安装步骤:

The preferred way to install this extension is through composer.推荐使用composer, (*2)

Either run命令行输入并运行, (*3)

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

or add或者在配置文件composer.json中添加, (*4)

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

to the require section of your composer.json file., (*5)

Usage使用方法:

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

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

2.config 配置, (*8)


// 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: http://yii2postor.sinaapp.com/web/?r=admin, (*9)

The Versions

24/02 2016

dev-master

9999999-dev

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

  Sources   Download

BSD-3-Clause

The Requires

 

by LinYanjun

yii2 yii 2 sae sinaapp saestorage adapt

24/06 2015

0.0.5

0.0.5.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

by LinYanjun

yii2 yii 2 sae sinaapp saestorage adapt

24/06 2015

0.0.4

0.0.4.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

by LinYanjun

yii2 yii 2 sae sinaapp saestorage adapt

24/06 2015

0.0.3

0.0.3.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

by LinYanjun

yii2 yii 2 sae sinaapp saestorage adapt

27/05 2015

0.0.1

0.0.1.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

by LinYanjun

yii2 yii 2 sae sinaapp saestorage adapt