return Apiato::call("Wechat@GetTmpKeyTask",[$data->tmpKey],['withinExpiration']);
call 这种方式最终都是运行 GetTmpKeyTask 的 run 方法,想要能有直观的方式知道 run 方法的入参。
代码提示 tabnine 勉强还行,方法跳转没想到啥好的方法。
1
coooold 2021 年 1 月 19 日
namespace PHPSTORM_META
|
2
coooold 2021 年 1 月 19 日
.phpstorm.meta.php
override() 方法 |
5
NakeSnail OP |
6
niucility 2021 年 1 月 19 日 via Android
不要用字符串的方式调用,用 GetTmpKeyTask::class 的方式来调用
|
7
NakeSnail OP @niucility apiato 这个框架不太推荐这么做,避免不同模块之间的直接依赖。我觉得也挺有道理,要是 GetTmpKeyTask::class 这种方式能解决第二个参数提示是 GetTmpKeyTask::class 这类的 RUN 方法的参数的吧就比较好了
|
11
NakeSnail OP @Wenco 各有各的道理吧,降低不同模块间的耦合度,方便拆成微服务吧,只是现实里这种作用不太大。我个人这两种写法都不太喜欢。敲起来都不太方便
|
12
zjsxwc 2021 年 2 月 17 日 via Android
再套个娃呗,写个脚本生成类似下面这种代码。
/** * @param string $datatmpKey */ function RunGetTmpKeyTask($datatmpKey){ return Apiato::call("Wechat@GetTmpKeyTask",[$datatmpKey],['withinExpiration']); } |
13
8355 2021 年 6 月 7 日
ACEJUMP?
|