Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit e064fc8

Browse files
authored
Swoft (#395)
* Update php_skywalking.h 增加 Swoft 框架的支持 * Update README.md 增加 Swoft 框架仓库地址 * Update README.md
1 parent ec13c1c commit e064fc8

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ SkyAPM PHP
2626
1. RabbitMQ
2727
1. Swoole ([Swoole](https://github.com/swoole/swoole-src))
2828
1. Hyperf ([Hyperf](https://github.com/hyperf/hyperf))
29+
1. Swoft ([Swoft](https://github.com/swoft-cloud/swoft))
2930
1. Tars-php ([Tars-php](https://github.com/TarsPHP/TarsPHP))
3031
1. LaravelS ([LaravelS](https://github.com/hhxsv5/laravel-s))
3132

php_skywalking.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,10 @@ extern zend_module_entry skywalking_module_entry;
6969

7070
#define SKY_IS_SWOOLE(func_name) (SKY_STRCMP(func_name, "{closure}"))
7171
#define SKY_IS_HYPERF(class_name, func_name) (SKY_STRCMP(class_name, "Hyperf\\HttpServer\\Server") && SKY_STRCMP(func_name, "onRequest"))
72+
#define SKY_IS_SWOFT(class_name, func_name) (SKY_STRCMP(class_name, "Swoft\\Http\\Server\\Swoole\\RequestListener") && SKY_STRCMP(func_name, "onRequest"))
7273
#define SKY_IS_TARS(class_name, func_name) (SKY_STRCMP(class_name, "Tars\\core\\Server") && SKY_STRCMP(func_name, "onRequest"))
7374
#define SKY_IS_LARAVELS(class_name, func_name) ((SKY_STRCMP(class_name, "Hhxsv\\LaravelS\\LaravelS") || SKY_STRCMP(class_name, "Hhxsv5\\LaravelS\\LaravelS")) && SKY_STRCMP(func_name, "onRequest"))
74-
#define SKY_IS_SWOOLE_FRAMEWORK(class_name, func_name) SKY_IS_HYPERF(class_name, func_name) || SKY_IS_TARS(class_name, func_name) || SKY_IS_LARAVELS(class_name, func_name)
75+
#define SKY_IS_SWOOLE_FRAMEWORK(class_name, func_name) SKY_IS_HYPERF(class_name, func_name) || SKY_IS_SWOFT(class_name, func_name) || SKY_IS_TARS(class_name, func_name) || SKY_IS_LARAVELS(class_name, func_name)
7576

7677
#if PHP_VERSION_ID < 80000
7778
#define SKY_ZEND_CALL_METHOD(obj, fn, func, ret, param, arg1, arg2) zend_call_method(obj, Z_OBJCE_P(obj), fn, ZEND_STRL(func), ret, param, arg1, arg2);

0 commit comments

Comments
 (0)