PFinal\Wechat\Api::__construct PHP Метод

__construct() публичный Метод

构造方法 可以使用一个数组作为参数
public __construct ( array | string $appId, string | null $appSecret = null, string | null $token = null, string | null $encodingAesKey = null, string | null $encodingAesKeyLast = null, $middleUrl = null )
$appId array | string
$appSecret string | null
$token string | null
$encodingAesKey string | null
$encodingAesKeyLast string | null
    public function __construct($appId, $appSecret = null, $token = null, $encodingAesKey = null, $encodingAesKeyLast = null, $middleUrl = null)
    {
        if (is_array($appId)) {
            extract($appId, EXTR_OVERWRITE);
        }
        $this->appId = $appId;
        $this->appSecret = $appSecret;
        $this->token = $token;
        $this->encodingAesKey = $encodingAesKey;
        $this->encodingAesKeyLast = $encodingAesKeyLast;
        $this->middleUrl = $middleUrl;
    }