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

Commit

Permalink
Swoft (#395)
Browse files Browse the repository at this point in the history
* Update php_skywalking.h

增加 Swoft 框架的支持

* Update README.md

增加 Swoft 框架仓库地址

* Update README.md
  • Loading branch information
xybingbing authored Jul 15, 2021
1 parent ec13c1c commit e064fc8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ SkyAPM PHP
1. RabbitMQ
1. Swoole ([Swoole](https://github.com/swoole/swoole-src))
1. Hyperf ([Hyperf](https://github.com/hyperf/hyperf))
1. Swoft ([Swoft](https://github.com/swoft-cloud/swoft))
1. Tars-php ([Tars-php](https://github.com/TarsPHP/TarsPHP))
1. LaravelS ([LaravelS](https://github.com/hhxsv5/laravel-s))

Expand Down
3 changes: 2 additions & 1 deletion php_skywalking.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,10 @@ extern zend_module_entry skywalking_module_entry;

#define SKY_IS_SWOOLE(func_name) (SKY_STRCMP(func_name, "{closure}"))
#define SKY_IS_HYPERF(class_name, func_name) (SKY_STRCMP(class_name, "Hyperf\\HttpServer\\Server") && SKY_STRCMP(func_name, "onRequest"))
#define SKY_IS_SWOFT(class_name, func_name) (SKY_STRCMP(class_name, "Swoft\\Http\\Server\\Swoole\\RequestListener") && SKY_STRCMP(func_name, "onRequest"))
#define SKY_IS_TARS(class_name, func_name) (SKY_STRCMP(class_name, "Tars\\core\\Server") && SKY_STRCMP(func_name, "onRequest"))
#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"))
#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)
#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)

#if PHP_VERSION_ID < 80000
#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);
Expand Down

0 comments on commit e064fc8

Please # to comment.