diff --git a/README.md b/README.md index 4c48163..10af049 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,12 @@ composer require easyswoole/verifycode 组件本身提供了默认配置,即使不做任何设置也可以直接生成验证码,需要对验证码进行自定义配置可以使用组件提供的`Conf`类进行动态配置 ``` +// x1 use easySwoole\VerifyCode\Conf; $Conf = new Conf(); +// x2 +use EasySwoole\VerifyCode\Conf; +$Conf = new Conf(); ``` #### 设置字符集合 @@ -109,10 +113,10 @@ $VCode = new VerifyCode($Conf); $VCode = new VerifyCode($Conf); // 随机生成验证码 -$Code = $VCode->DrawCode(); +$Code = $VCode->DrawCode(); // x2 ->drawCode // 生成指定验证码 -$Code = $VCode->DrawCode('MyCode'); +$Code = $VCode->DrawCode('MyCode'); // x2 ->drawCode ``` 生成好验证码后结果是一个`Result`类,可以使用`getImageBody`获取验证码的图片内容,使用`getImageStr`获得验证码字符,`getMineType`获得验证码的Mine信息 \ No newline at end of file diff --git a/composer.json b/composer.json index 6858656..c5083dd 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ }, "autoload": { "psr-4": { - "easySwoole\\VerifyCode\\":"src" + "EasySwoole\\VerifyCode\\":"src" } } } diff --git a/src/Conf.php b/src/Conf.php index 5bbea68..3ea5f2a 100644 --- a/src/Conf.php +++ b/src/Conf.php @@ -7,9 +7,9 @@ // | Welcome Join QQGroup 633921431 // +---------------------------------------------------------------------- -namespace easySwoole\VerifyCode; +namespace EasySwoole\VerifyCode; -use Core\Component\Spl\SplBean; +use EasySwoole\Core\Component\Spl\SplBean; /** * 验证码配置文件 diff --git a/src/MIME.php b/src/MIME.php index 12ad6b8..ae28d94 100644 --- a/src/MIME.php +++ b/src/MIME.php @@ -7,7 +7,7 @@ // | Welcome Join QQGroup 633921431 // +---------------------------------------------------------------------- -namespace easySwoole\VerifyCode; +namespace EasySwoole\VerifyCode; /** * 验证码MIME类型 diff --git a/src/Result.php b/src/Result.php index b6df9c8..268412b 100644 --- a/src/Result.php +++ b/src/Result.php @@ -7,7 +7,7 @@ // | Welcome Join QQGroup 633921431 // +---------------------------------------------------------------------- -namespace easySwoole\VerifyCode; +namespace EasySwoole\VerifyCode; /** * 验证码结果类 diff --git a/src/VerifyCode.php b/src/VerifyCode.php index c4de800..5599ff7 100644 --- a/src/VerifyCode.php +++ b/src/VerifyCode.php @@ -7,7 +7,7 @@ // | Welcome Join QQGroup 633921431 // +---------------------------------------------------------------------- -namespace easySwoole\VerifyCode; +namespace EasySwoole\VerifyCode; /** * 验证码处理类