ThinkPHP Namespace

use ThinkPHP5.0
to have a file namespace

namespace WxPay;

there are three classes a, b, c,

in this file.

I cannot introduce

by using use WxPay\ a; .

according to the rules of TP, the class name should be the same as the file name, but this is a SDK file with 20 classes, and it is not realistic to separate them.

May.20,2022
The reason why

requires the class name to be the same as the file name is to facilitate the include/require file according to use . Since the file and class do not conform to the PSR rules, then manually include/require this file, and then use WxPay\ a;

Menu