diff --git a/WeChat/Contracts/BasicPay.php b/WeChat/Contracts/BasicPay.php index f9865ae..263ede6 100644 --- a/WeChat/Contracts/BasicPay.php +++ b/WeChat/Contracts/BasicPay.php @@ -53,7 +53,7 @@ class BasicPay throw new InvalidArgumentException("Missing Config -- [mch_key]"); } if (!empty($options['cache_path'])) { - Tools::$CachePath = $options['cache_path']; + Tools::$cache_path = $options['cache_path']; } $this->config = new DataArray($options); // 商户基础参数 diff --git a/WeChat/Contracts/BasicWeChat.php b/WeChat/Contracts/BasicWeChat.php index 8c3cdd2..30bbc25 100644 --- a/WeChat/Contracts/BasicWeChat.php +++ b/WeChat/Contracts/BasicWeChat.php @@ -70,7 +70,7 @@ class BasicWeChat $this->GetAccessTokenCallback = $options['GetAccessTokenCallback']; } if (!empty($options['cache_path'])) { - Tools::$CachePath = $options['cache_path']; + Tools::$cache_path = $options['cache_path']; } $this->config = new DataArray($options); } diff --git a/WeChat/Contracts/Tools.php b/WeChat/Contracts/Tools.php index da4a24a..40e2371 100644 --- a/WeChat/Contracts/Tools.php +++ b/WeChat/Contracts/Tools.php @@ -29,7 +29,7 @@ class Tools * 缓存路径 * @var null */ - public static $CachePath = null; + public static $cache_path = null; /** @@ -320,11 +320,11 @@ class Tools */ private static function getCacheName($name) { - if (empty(self::$CachePath)) { - self::$CachePath = dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR . 'Cache' . DIRECTORY_SEPARATOR; + if (empty(self::$cache_path)) { + self::$cache_path = dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR . 'Cache' . DIRECTORY_SEPARATOR; } - self::$CachePath = rtrim(self::$CachePath, '/\\') . DIRECTORY_SEPARATOR; - file_exists(self::$CachePath) || mkdir(self::$CachePath, 0755, true); - return self::$CachePath . $name; + self::$cache_path = rtrim(self::$cache_path, '/\\') . DIRECTORY_SEPARATOR; + file_exists(self::$cache_path) || mkdir(self::$cache_path, 0755, true); + return self::$cache_path . $name; } } \ No newline at end of file