All Projects → parker714 → yii2-s

parker714 / yii2-s

Licence: MIT license
🚀speed up yii2 tcp server、 restful by swoole

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to yii2-s

Cms
Feehi CMS based on yii2
Stars: ✭ 493 (+1350%)
Mutual labels:  yii2, swoole
Yii2 Swoole
yii2 swoole,让yii2运行在swoole上
Stars: ✭ 317 (+832.35%)
Mutual labels:  yii2, swoole
yii2-websocket
基于swoole的websocket
Stars: ✭ 31 (-8.82%)
Mutual labels:  yii2, swoole
Yii2 Swoole
make yii2 project runing on swoole
Stars: ✭ 161 (+373.53%)
Mutual labels:  yii2, swoole
docker-images
本仓库为自定义及收藏的一些镜像,方便使用。包含PHP5、PHP7开发环境等镜像。
Stars: ✭ 18 (-47.06%)
Mutual labels:  swoole
content
Content management system for Yii2
Stars: ✭ 54 (+58.82%)
Mutual labels:  yii2
docker-swoole-webapp
Simple Docker-image to build your applications based on Async PHP extensions.
Stars: ✭ 26 (-23.53%)
Mutual labels:  swoole
yii2-uuid
UUID Helper and validator for Yii 2
Stars: ✭ 33 (-2.94%)
Mutual labels:  yii2
fast-laravel
基于Swoole的高性能HTTP服务器,加速您Laravel应用程序。
Stars: ✭ 33 (-2.94%)
Mutual labels:  swoole
crow
Fast, unopinionated, minimalist web framework for PHP.
Stars: ✭ 47 (+38.24%)
Mutual labels:  swoole
yii2-basic-adminlte3
Yii 2 + AdminLTE 3 (Bootstrap 4) Yii2 Basic Project Template Build on AssetBundle (No CDN/Import CSS,JS Files)
Stars: ✭ 24 (-29.41%)
Mutual labels:  yii2
yii2-mailqueue
Yii2 mail queue component for yii2-swiftmailer.
Stars: ✭ 15 (-55.88%)
Mutual labels:  yii2
swoole-ide-helper-phar
Swoole IDE 自动补全,PHAR 包。
Stars: ✭ 14 (-58.82%)
Mutual labels:  swoole
yii2-grid-view-library
Highly enhanced GridView widget and grid components for Yii2
Stars: ✭ 57 (+67.65%)
Mutual labels:  yii2
swoole-link-monitor
基于swoole 定时器与woker 实现链路监控
Stars: ✭ 34 (+0%)
Mutual labels:  swoole
yii2-ftp
FTP Client for Yii2
Stars: ✭ 32 (-5.88%)
Mutual labels:  yii2
yii2-stat
Yii2 Multi Web Statistic Module (yametrika, google-analytic, own db-counter)
Stars: ✭ 18 (-47.06%)
Mutual labels:  yii2
LightMoon
A framework based swoole
Stars: ✭ 17 (-50%)
Mutual labels:  swoole
phpstan-extensions
Extensions for PHPStan
Stars: ✭ 61 (+79.41%)
Mutual labels:  yii2
yii2-translatable
Translatable behavior aggregates logic of linking translations to the primary model
Stars: ✭ 15 (-55.88%)
Mutual labels:  yii2

Swoole Extension for Yii 2

This extension provides an swoole for Yii framework 2.0 based on swoole.

For license information check the LICENSE-file.

Latest Stable Version

Installation

The preferred way to install this extension is through composer.

Either run

composer require parker714/yii2-s -vvv

Usage

After installation, you need to modify the configuration and then use it:

# 1.Add the configuration in the console.php
...
'bootstrap'     => ['log'],
'controllerMap' => [
    'sw-http' => [
        'class'  => \parker714\yii2s\SwController::class,
        'server' => [
            'class'      => \parker714\yii2s\servers\Http::class,
            'webAppConf' => require(__DIR__ . '/web.php'),
    ],
...  

# 2.Put the web.php configuration,sw exception、request、response are different from php-fpm
...
'components' => [
    'errorHandler' => [
        'class'            => \parker714\yii2s\components\ErrorHandle::class,
        'as errorResponse' => [
            'class'    => \parker714\yii2s\behaviors\ErrorResponse::class,
        ],
    ],
    'response'     => [
        'class'  => \parker714\yii2s\components\Response::class,
        'format' => \yii\web\Response::FORMAT_JSON,
    ],
    'request'      => [
        'class'   => \parker714\yii2s\components\Request::class,
        'parsers' => [
            'application/json' => \yii\web\JsonParser::class,
        ],
    ]
...

# 3.Management server
./yii sw-http/server start|stop|reload

Tutorials

1.More ways to use

2.The idea of using swoole in yii2

Add WeChat to learn more

Usage example of Yii2 shell

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].