新增微信动态调用

This commit is contained in:
JaguarJack 2020-06-19 19:28:56 +08:00
parent 2c9e22ac6c
commit e4273e5a1a

View File

@ -27,9 +27,31 @@ use think\helper\Str;
*/
class WeChat
{
/**
* 静态调用
*
* @time 2020年06月19日
* @param $name
* @param $arguments
* @return mixed
*/
public static function __callStatic($name, $arguments)
{
// TODO: Implement __callStatic() method.
return Factory::{$name}(\config('wechat.'. Str::snake($name)));
}
/**
* 动态调用
*
* @time 2020年06月19日
* @param $name
* @param $arguments
* @return mixed
*/
public function __call($name, $arguments)
{
// TODO: Implement __call() method.
return Factory::{$name}(\config('wechat.'. Str::snake($name)));
}
}