diff --git a/application/admin/view/index/main.html b/application/admin/view/index/main.html index 0431921a4..cd69584f3 100644 --- a/application/admin/view/index/main.html +++ b/application/admin/view/index/main.html @@ -165,11 +165,11 @@ 产品名称 - framework + ThinkAdmin 在线体验 - http://framework.thinkadmin.top + http://demo.thinkadmin.top 官方QQ群 @@ -181,11 +181,11 @@ 项目地址 - https://github.com/zoujingli/framework + https://github.com/zoujingli/ThinkAdmin BUG反馈 - https://github.com/zoujingli/framework/issues + https://github.com/zoujingli/ThinkAdmin/issues 开发团队 @@ -204,4 +204,4 @@ -{/block} \ No newline at end of file +{/block} diff --git a/vendor/autoload.php b/vendor/autoload.php index b8a207d72..9dc16a0c3 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit4e7d8a24dc5124bf8819757abb2b16a4::getLoader(); +return ComposerAutoloaderInitcd810a1640b6294256452cfc7e3e3b69::getLoader(); diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index ecb90e410..d3231b8ea 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -212,13 +212,16 @@ return array( 'library\\tools\\Http' => $vendorDir . '/zoujingli/think-library/src/tools/Http.php', 'library\\tools\\Node' => $vendorDir . '/zoujingli/think-library/src/tools/Node.php', 'library\\tools\\Options' => $vendorDir . '/zoujingli/think-library/src/tools/Options.php', + 'think\\Collection' => $vendorDir . '/topthink/think-helper/src/Collection.php', 'think\\Queue' => $vendorDir . '/topthink/think-queue/src/Queue.php', 'think\\composer\\Plugin' => $vendorDir . '/topthink/think-installer/src/Plugin.php', 'think\\composer\\ThinkExtend' => $vendorDir . '/topthink/think-installer/src/ThinkExtend.php', 'think\\composer\\ThinkFramework' => $vendorDir . '/topthink/think-installer/src/ThinkFramework.php', 'think\\composer\\ThinkTesting' => $vendorDir . '/topthink/think-installer/src/ThinkTesting.php', - 'think\\helper\\Arr' => $vendorDir . '/topthink/think-helper/src/Arr.php', - 'think\\helper\\Str' => $vendorDir . '/topthink/think-helper/src/Str.php', + 'think\\contract\\Arrayable' => $vendorDir . '/topthink/think-helper/src/contract/Arrayable.php', + 'think\\contract\\Jsonable' => $vendorDir . '/topthink/think-helper/src/contract/Jsonable.php', + 'think\\helper\\Arr' => $vendorDir . '/topthink/think-helper/src/helper/Arr.php', + 'think\\helper\\Str' => $vendorDir . '/topthink/think-helper/src/helper/Str.php', 'think\\queue\\CallQueuedHandler' => $vendorDir . '/topthink/think-queue/src/queue/CallQueuedHandler.php', 'think\\queue\\Connector' => $vendorDir . '/topthink/think-queue/src/queue/Connector.php', 'think\\queue\\Job' => $vendorDir . '/topthink/think-queue/src/queue/Job.php', diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index 48e751d8f..7631ea36c 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -6,9 +6,8 @@ $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( - 'think\\helper\\' => array($vendorDir . '/topthink/think-helper/src'), 'think\\composer\\' => array($vendorDir . '/topthink/think-installer/src'), - 'think\\' => array($vendorDir . '/topthink/think-queue/src'), + 'think\\' => array($vendorDir . '/topthink/think-helper/src', $vendorDir . '/topthink/think-queue/src'), 'library\\' => array($vendorDir . '/zoujingli/think-library/src'), 'WePay\\' => array($vendorDir . '/zoujingli/wechat-developer/WePay'), 'WeOpen\\' => array($vendorDir . '/zoujingli/weopen-developer/WeOpen'), diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index b703ce53d..81a58748f 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit4e7d8a24dc5124bf8819757abb2b16a4 +class ComposerAutoloaderInitcd810a1640b6294256452cfc7e3e3b69 { private static $loader; @@ -19,15 +19,15 @@ class ComposerAutoloaderInit4e7d8a24dc5124bf8819757abb2b16a4 return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit4e7d8a24dc5124bf8819757abb2b16a4', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInitcd810a1640b6294256452cfc7e3e3b69', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInit4e7d8a24dc5124bf8819757abb2b16a4', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInitcd810a1640b6294256452cfc7e3e3b69', 'loadClassLoader')); $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); if ($useStaticLoader) { require_once __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit4e7d8a24dc5124bf8819757abb2b16a4::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInitcd810a1640b6294256452cfc7e3e3b69::getInitializer($loader)); } else { $map = require __DIR__ . '/autoload_namespaces.php'; foreach ($map as $namespace => $path) { @@ -48,19 +48,19 @@ class ComposerAutoloaderInit4e7d8a24dc5124bf8819757abb2b16a4 $loader->register(true); if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInit4e7d8a24dc5124bf8819757abb2b16a4::$files; + $includeFiles = Composer\Autoload\ComposerStaticInitcd810a1640b6294256452cfc7e3e3b69::$files; } else { $includeFiles = require __DIR__ . '/autoload_files.php'; } foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire4e7d8a24dc5124bf8819757abb2b16a4($fileIdentifier, $file); + composerRequirecd810a1640b6294256452cfc7e3e3b69($fileIdentifier, $file); } return $loader; } } -function composerRequire4e7d8a24dc5124bf8819757abb2b16a4($fileIdentifier, $file) +function composerRequirecd810a1640b6294256452cfc7e3e3b69($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { require $file; diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index bab3daec3..1f42aba7c 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit4e7d8a24dc5124bf8819757abb2b16a4 +class ComposerStaticInitcd810a1640b6294256452cfc7e3e3b69 { public static $files = array ( '841780ea2e1d6545ea3a253239d59c05' => __DIR__ . '/..' . '/qiniu/php-sdk/src/Qiniu/functions.php', @@ -16,7 +16,6 @@ class ComposerStaticInit4e7d8a24dc5124bf8819757abb2b16a4 public static $prefixLengthsPsr4 = array ( 't' => array ( - 'think\\helper\\' => 13, 'think\\composer\\' => 15, 'think\\' => 6, ), @@ -54,17 +53,14 @@ class ComposerStaticInit4e7d8a24dc5124bf8819757abb2b16a4 ); public static $prefixDirsPsr4 = array ( - 'think\\helper\\' => - array ( - 0 => __DIR__ . '/..' . '/topthink/think-helper/src', - ), 'think\\composer\\' => array ( 0 => __DIR__ . '/..' . '/topthink/think-installer/src', ), 'think\\' => array ( - 0 => __DIR__ . '/..' . '/topthink/think-queue/src', + 0 => __DIR__ . '/..' . '/topthink/think-helper/src', + 1 => __DIR__ . '/..' . '/topthink/think-queue/src', ), 'library\\' => array ( @@ -317,13 +313,16 @@ class ComposerStaticInit4e7d8a24dc5124bf8819757abb2b16a4 'library\\tools\\Http' => __DIR__ . '/..' . '/zoujingli/think-library/src/tools/Http.php', 'library\\tools\\Node' => __DIR__ . '/..' . '/zoujingli/think-library/src/tools/Node.php', 'library\\tools\\Options' => __DIR__ . '/..' . '/zoujingli/think-library/src/tools/Options.php', + 'think\\Collection' => __DIR__ . '/..' . '/topthink/think-helper/src/Collection.php', 'think\\Queue' => __DIR__ . '/..' . '/topthink/think-queue/src/Queue.php', 'think\\composer\\Plugin' => __DIR__ . '/..' . '/topthink/think-installer/src/Plugin.php', 'think\\composer\\ThinkExtend' => __DIR__ . '/..' . '/topthink/think-installer/src/ThinkExtend.php', 'think\\composer\\ThinkFramework' => __DIR__ . '/..' . '/topthink/think-installer/src/ThinkFramework.php', 'think\\composer\\ThinkTesting' => __DIR__ . '/..' . '/topthink/think-installer/src/ThinkTesting.php', - 'think\\helper\\Arr' => __DIR__ . '/..' . '/topthink/think-helper/src/Arr.php', - 'think\\helper\\Str' => __DIR__ . '/..' . '/topthink/think-helper/src/Str.php', + 'think\\contract\\Arrayable' => __DIR__ . '/..' . '/topthink/think-helper/src/contract/Arrayable.php', + 'think\\contract\\Jsonable' => __DIR__ . '/..' . '/topthink/think-helper/src/contract/Jsonable.php', + 'think\\helper\\Arr' => __DIR__ . '/..' . '/topthink/think-helper/src/helper/Arr.php', + 'think\\helper\\Str' => __DIR__ . '/..' . '/topthink/think-helper/src/helper/Str.php', 'think\\queue\\CallQueuedHandler' => __DIR__ . '/..' . '/topthink/think-queue/src/queue/CallQueuedHandler.php', 'think\\queue\\Connector' => __DIR__ . '/..' . '/topthink/think-queue/src/queue/Connector.php', 'think\\queue\\Job' => __DIR__ . '/..' . '/topthink/think-queue/src/queue/Job.php', @@ -348,9 +347,9 @@ class ComposerStaticInit4e7d8a24dc5124bf8819757abb2b16a4 public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit4e7d8a24dc5124bf8819757abb2b16a4::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit4e7d8a24dc5124bf8819757abb2b16a4::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit4e7d8a24dc5124bf8819757abb2b16a4::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInitcd810a1640b6294256452cfc7e3e3b69::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInitcd810a1640b6294256452cfc7e3e3b69::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInitcd810a1640b6294256452cfc7e3e3b69::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index bf0b11118..bf403efd0 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -298,17 +298,17 @@ }, { "name": "topthink/think-helper", - "version": "v3.0.0", - "version_normalized": "3.0.0.0", + "version": "v3.1.2", + "version_normalized": "3.1.2.0", "source": { "type": "git", "url": "https://github.com/top-think/think-helper.git", - "reference": "8ba5f66e68106369fcc3211e7d2dbaf7bc9ce455" + "reference": "a629c4271fdf3d7e7c6d89089791417cb4796a2c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/top-think/think-helper/zipball/8ba5f66e68106369fcc3211e7d2dbaf7bc9ce455", - "reference": "8ba5f66e68106369fcc3211e7d2dbaf7bc9ce455", + "url": "https://api.github.com/repos/top-think/think-helper/zipball/a629c4271fdf3d7e7c6d89089791417cb4796a2c", + "reference": "a629c4271fdf3d7e7c6d89089791417cb4796a2c", "shasum": "", "mirrors": [ { @@ -317,12 +317,15 @@ } ] }, - "time": "2019-03-14T09:28:59+00:00", + "require": { + "php": ">=7.1.0" + }, + "time": "2019-07-11T04:35:03+00:00", "type": "library", "installation-source": "dist", "autoload": { "psr-4": { - "think\\helper\\": "src" + "think\\": "src" }, "files": [ "src/helper.php" @@ -338,7 +341,7 @@ "email": "448901948@qq.com" } ], - "description": "The ThinkPHP5 Helper Package" + "description": "The ThinkPHP6 Helper Package" }, { "name": "topthink/think-installer", @@ -499,12 +502,12 @@ "source": { "type": "git", "url": "https://github.com/zoujingli/ThinkLibrary.git", - "reference": "bcd443b8408ac772eddc163c6b9663dad8f3aee8" + "reference": "12cc9a956969fa6716cb7da75fe6e5fc5fa8985d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/bcd443b8408ac772eddc163c6b9663dad8f3aee8", - "reference": "bcd443b8408ac772eddc163c6b9663dad8f3aee8", + "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/12cc9a956969fa6716cb7da75fe6e5fc5fa8985d", + "reference": "12cc9a956969fa6716cb7da75fe6e5fc5fa8985d", "shasum": "", "mirrors": [ { @@ -523,7 +526,7 @@ "qiniu/php-sdk": "^7.2", "topthink/framework": "5.1.*" }, - "time": "2019-07-08T02:32:45+00:00", + "time": "2019-07-08T02:34:45+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -614,12 +617,12 @@ "source": { "type": "git", "url": "https://github.com/zoujingli/WeOpenDeveloper.git", - "reference": "3adfc5140c3fb3310facbd6a44f3b52061918d1f" + "reference": "629f14c1586ac51bdcef47b17d68a70b89d28897" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zoujingli/WeOpenDeveloper/zipball/3adfc5140c3fb3310facbd6a44f3b52061918d1f", - "reference": "3adfc5140c3fb3310facbd6a44f3b52061918d1f", + "url": "https://api.github.com/repos/zoujingli/WeOpenDeveloper/zipball/629f14c1586ac51bdcef47b17d68a70b89d28897", + "reference": "629f14c1586ac51bdcef47b17d68a70b89d28897", "shasum": "", "mirrors": [ { @@ -635,7 +638,7 @@ "php": ">=5.4", "zoujingli/wechat-developer": "^1.0" }, - "time": "2019-07-03T07:16:52+00:00", + "time": "2019-07-08T07:11:04+00:00", "type": "library", "installation-source": "dist", "autoload": { diff --git a/vendor/topthink/think-helper/.gitignore b/vendor/topthink/think-helper/.gitignore index e244eda0b..d851bdbff 100644 --- a/vendor/topthink/think-helper/.gitignore +++ b/vendor/topthink/think-helper/.gitignore @@ -1,2 +1,3 @@ /vendor/ -/.idea/ \ No newline at end of file +/.idea/ +composer.lock \ No newline at end of file diff --git a/vendor/topthink/think-helper/README.md b/vendor/topthink/think-helper/README.md index 51b69c53f..7baf8f7b5 100644 --- a/vendor/topthink/think-helper/README.md +++ b/vendor/topthink/think-helper/README.md @@ -1,10 +1,11 @@ -# thinkphp5 常用的一些扩展类库 +# thinkphp6 常用的一些扩展类库 -> 更新完善中 +基于PHP7.1+ > 以下类库都在`\\think\\helper`命名空间下 ## Str + > 字符串操作 ``` diff --git a/vendor/topthink/think-helper/composer.json b/vendor/topthink/think-helper/composer.json index d246fa3c9..b68c43b51 100644 --- a/vendor/topthink/think-helper/composer.json +++ b/vendor/topthink/think-helper/composer.json @@ -1,6 +1,6 @@ { "name": "topthink/think-helper", - "description": "The ThinkPHP5 Helper Package", + "description": "The ThinkPHP6 Helper Package", "license": "Apache-2.0", "authors": [ { @@ -8,9 +8,12 @@ "email": "448901948@qq.com" } ], + "require": { + "php": ">=7.1.0" + }, "autoload": { "psr-4": { - "think\\helper\\": "src" + "think\\": "src" }, "files": [ "src/helper.php" diff --git a/vendor/topthink/think-helper/src/Arr.php b/vendor/topthink/think-helper/src/Arr.php deleted file mode 100644 index 7350bb245..000000000 --- a/vendor/topthink/think-helper/src/Arr.php +++ /dev/null @@ -1,41 +0,0 @@ - -// +---------------------------------------------------------------------- - -namespace think\helper; - - -class Arr -{ - - public static function isAssoc(array $array) - { - $keys = array_keys($array); - - return array_keys($keys) !== $keys; - } - - public static function sortRecursive($array) - { - foreach ($array as &$value) { - if (is_array($value)) { - $value = static::sortRecursive($value); - } - } - - if (static::isAssoc($array)) { - ksort($array); - } else { - sort($array); - } - - return $array; - } -} \ No newline at end of file diff --git a/vendor/topthink/think-helper/src/Collection.php b/vendor/topthink/think-helper/src/Collection.php new file mode 100644 index 000000000..c6df69b36 --- /dev/null +++ b/vendor/topthink/think-helper/src/Collection.php @@ -0,0 +1,651 @@ + +// +---------------------------------------------------------------------- +declare (strict_types = 1); + +namespace think; + +use ArrayAccess; +use ArrayIterator; +use Countable; +use IteratorAggregate; +use JsonSerializable; +use think\contract\Arrayable; +use think\contract\Jsonable; +use think\helper\Arr; + +/** + * 数据集管理类 + */ +class Collection implements ArrayAccess, Countable, IteratorAggregate, JsonSerializable, Arrayable, Jsonable +{ + /** + * 数据集数据 + * @var array + */ + protected $items = []; + + public function __construct($items = []) + { + $this->items = $this->convertToArray($items); + } + + public static function make($items = []) + { + return new static($items); + } + + /** + * 是否为空 + * @access public + * @return bool + */ + public function isEmpty(): bool + { + return empty($this->items); + } + + public function toArray(): array + { + return array_map(function ($value) { + return $value instanceof Arrayable ? $value->toArray() : $value; + }, $this->items); + } + + public function all(): array + { + return $this->items; + } + + /** + * 合并数组 + * + * @access public + * @param mixed $items 数据 + * @return static + */ + public function merge($items) + { + return new static(array_merge($this->items, $this->convertToArray($items))); + } + + /** + * 按指定键整理数据 + * + * @access public + * @param mixed $items 数据 + * @param string $indexKey 键名 + * @return array + */ + public function dictionary($items = null, string &$indexKey = null) + { + if ($items instanceof self) { + $items = $items->all(); + } + + $items = is_null($items) ? $this->items : $items; + + if ($items && empty($indexKey)) { + $indexKey = is_array($items[0]) ? 'id' : $items[0]->getPk(); + } + + if (isset($indexKey) && is_string($indexKey)) { + return array_column($items, null, $indexKey); + } + + return $items; + } + + /** + * 比较数组,返回差集 + * + * @access public + * @param mixed $items 数据 + * @param string $indexKey 指定比较的键名 + * @return static + */ + public function diff($items, string $indexKey = null) + { + if ($this->isEmpty() || is_scalar($this->items[0])) { + return new static(array_diff($this->items, $this->convertToArray($items))); + } + + $diff = []; + $dictionary = $this->dictionary($items, $indexKey); + + if (is_string($indexKey)) { + foreach ($this->items as $item) { + if (!isset($dictionary[$item[$indexKey]])) { + $diff[] = $item; + } + } + } + + return new static($diff); + } + + /** + * 比较数组,返回交集 + * + * @access public + * @param mixed $items 数据 + * @param string $indexKey 指定比较的键名 + * @return static + */ + public function intersect($items, string $indexKey = null) + { + if ($this->isEmpty() || is_scalar($this->items[0])) { + return new static(array_diff($this->items, $this->convertToArray($items))); + } + + $intersect = []; + $dictionary = $this->dictionary($items, $indexKey); + + if (is_string($indexKey)) { + foreach ($this->items as $item) { + if (isset($dictionary[$item[$indexKey]])) { + $intersect[] = $item; + } + } + } + + return new static($intersect); + } + + /** + * 交换数组中的键和值 + * + * @access public + * @return static + */ + public function flip() + { + return new static(array_flip($this->items)); + } + + /** + * 返回数组中所有的键名 + * + * @access public + * @return static + */ + public function keys() + { + return new static(array_keys($this->items)); + } + + /** + * 返回数组中所有的值组成的新 Collection 实例 + * @access public + * @return static + */ + public function values() + { + return new static(array_values($this->items)); + } + + /** + * 删除数组的最后一个元素(出栈) + * + * @access public + * @return mixed + */ + public function pop() + { + return array_pop($this->items); + } + + /** + * 通过使用用户自定义函数,以字符串返回数组 + * + * @access public + * @param callable $callback 调用方法 + * @param mixed $initial + * @return mixed + */ + public function reduce(callable $callback, $initial = null) + { + return array_reduce($this->items, $callback, $initial); + } + + /** + * 以相反的顺序返回数组。 + * + * @access public + * @return static + */ + public function reverse() + { + return new static(array_reverse($this->items)); + } + + /** + * 删除数组中首个元素,并返回被删除元素的值 + * + * @access public + * @return mixed + */ + public function shift() + { + return array_shift($this->items); + } + + /** + * 在数组结尾插入一个元素 + * @access public + * @param mixed $value 元素 + * @param string $key KEY + * @return void + */ + public function push($value, string $key = null): void + { + if (is_null($key)) { + $this->items[] = $value; + } else { + $this->items[$key] = $value; + } + } + + /** + * 把一个数组分割为新的数组块. + * + * @access public + * @param int $size 块大小 + * @param bool $preserveKeys + * @return static + */ + public function chunk(int $size, bool $preserveKeys = false) + { + $chunks = []; + + foreach (array_chunk($this->items, $size, $preserveKeys) as $chunk) { + $chunks[] = new static($chunk); + } + + return new static($chunks); + } + + /** + * 在数组开头插入一个元素 + * @access public + * @param mixed $value 元素 + * @param string $key KEY + * @return void + */ + public function unshift($value, string $key = null): void + { + if (is_null($key)) { + array_unshift($this->items, $value); + } else { + $this->items = [$key => $value] + $this->items; + } + } + + /** + * 给每个元素执行个回调 + * + * @access public + * @param callable $callback 回调 + * @return $this + */ + public function each(callable $callback) + { + foreach ($this->items as $key => $item) { + $result = $callback($item, $key); + + if (false === $result) { + break; + } elseif (!is_object($item)) { + $this->items[$key] = $result; + } + } + + return $this; + } + + /** + * 用回调函数处理数组中的元素 + * @access public + * @param callable|null $callback 回调 + * @return static + */ + public function map(callable $callback) + { + return new static(array_map($callback, $this->items)); + } + + /** + * 用回调函数过滤数组中的元素 + * @access public + * @param callable|null $callback 回调 + * @return static + */ + public function filter(callable $callback = null) + { + if ($callback) { + return new static(array_filter($this->items, $callback)); + } + + return new static(array_filter($this->items)); + } + + /** + * 根据字段条件过滤数组中的元素 + * @access public + * @param string $field 字段名 + * @param mixed $operator 操作符 + * @param mixed $value 数据 + * @return static + */ + public function where(string $field, $operator, $value = null) + { + if (is_null($value)) { + $value = $operator; + $operator = '='; + } + + return $this->filter(function ($data) use ($field, $operator, $value) { + if (strpos($field, '.')) { + list($field, $relation) = explode('.', $field); + + $result = $data[$field][$relation] ?? null; + } else { + $result = $data[$field] ?? null; + } + + switch ($operator) { + case '===': + return $result === $value; + case '!==': + return $result !== $value; + case '!=': + case '<>': + return $result != $value; + case '>': + return $result > $value; + case '>=': + return $result >= $value; + case '<': + return $result < $value; + case '<=': + return $result <= $value; + case 'like': + return is_string($result) && false !== strpos($result, $value); + case 'not like': + return is_string($result) && false === strpos($result, $value); + case 'in': + return is_scalar($result) && in_array($result, $value, true); + case 'not in': + return is_scalar($result) && !in_array($result, $value, true); + case 'between': + list($min, $max) = is_string($value) ? explode(',', $value) : $value; + return is_scalar($result) && $result >= $min && $result <= $max; + case 'not between': + list($min, $max) = is_string($value) ? explode(',', $value) : $value; + return is_scalar($result) && $result > $max || $result < $min; + case '==': + case '=': + default: + return $result == $value; + } + }); + } + + /** + * LIKE过滤 + * @access public + * @param string $field 字段名 + * @param string $value 数据 + * @return static + */ + public function whereLike(string $field, string $value) + { + return $this->where($field, 'like', $value); + } + + /** + * NOT LIKE过滤 + * @access public + * @param string $field 字段名 + * @param string $value 数据 + * @return static + */ + public function whereNotLike(string $field, string $value) + { + return $this->where($field, 'not like', $value); + } + + /** + * IN过滤 + * @access public + * @param string $field 字段名 + * @param array $value 数据 + * @return static + */ + public function whereIn(string $field, array $value) + { + return $this->where($field, 'in', $value); + } + + /** + * NOT IN过滤 + * @access public + * @param string $field 字段名 + * @param array $value 数据 + * @return static + */ + public function whereNotIn(string $field, array $value) + { + return $this->where($field, 'not in', $value); + } + + /** + * BETWEEN 过滤 + * @access public + * @param string $field 字段名 + * @param mixed $value 数据 + * @return static + */ + public function whereBetween(string $field, $value) + { + return $this->where($field, 'between', $value); + } + + /** + * NOT BETWEEN 过滤 + * @access public + * @param string $field 字段名 + * @param mixed $value 数据 + * @return static + */ + public function whereNotBetween(string $field, $value) + { + return $this->where($field, 'not between', $value); + } + + /** + * 返回数据中指定的一列 + * @access public + * @param string $columnKey 键名 + * @param string $indexKey 作为索引值的列 + * @return array + */ + public function column(string $columnKey, string $indexKey = null) + { + return array_column($this->items, $columnKey, $indexKey); + } + + /** + * 对数组排序 + * + * @access public + * @param callable|null $callback 回调 + * @return static + */ + public function sort(callable $callback = null) + { + $items = $this->items; + + $callback = $callback ?: function ($a, $b) { + return $a == $b ? 0 : (($a < $b) ? -1 : 1); + }; + + uasort($items, $callback); + + return new static($items); + } + + /** + * 指定字段排序 + * @access public + * @param string $field 排序字段 + * @param string $order 排序 + * @return $this + */ + public function order(string $field, string $order = null) + { + return $this->sort(function ($a, $b) use ($field, $order) { + $fieldA = $a[$field] ?? null; + $fieldB = $b[$field] ?? null; + + return 'desc' == strtolower($order) ? strcmp($fieldB, $fieldA) : strcmp($fieldA, $fieldB); + }); + } + + /** + * 将数组打乱 + * + * @access public + * @return static + */ + public function shuffle() + { + $items = $this->items; + + shuffle($items); + + return new static($items); + } + + /** + * 获取最后一个单元数据 + * + * @access public + * @param callable|null $callback + * @param null $default + * @return mixed + */ + public function first(callable $callback = null, $default = null) + { + return Arr::first($this->items, $callback, $default); + } + + /** + * 获取第一个单元数据 + * + * @access public + * @param callable|null $callback + * @param null $default + * @return mixed + */ + public function last(callable $callback = null, $default = null) + { + return Arr::last($this->items, $callback, $default); + } + + /** + * 截取数组 + * + * @access public + * @param int $offset 起始位置 + * @param int $length 截取长度 + * @param bool $preserveKeys preserveKeys + * @return static + */ + public function slice(int $offset, int $length = null, bool $preserveKeys = false) + { + return new static(array_slice($this->items, $offset, $length, $preserveKeys)); + } + + // ArrayAccess + public function offsetExists($offset) + { + return array_key_exists($offset, $this->items); + } + + public function offsetGet($offset) + { + return $this->items[$offset]; + } + + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->items[] = $value; + } else { + $this->items[$offset] = $value; + } + } + + public function offsetUnset($offset) + { + unset($this->items[$offset]); + } + + //Countable + public function count() + { + return count($this->items); + } + + //IteratorAggregate + public function getIterator() + { + return new ArrayIterator($this->items); + } + + //JsonSerializable + public function jsonSerialize() + { + return $this->toArray(); + } + + /** + * 转换当前数据集为JSON字符串 + * @access public + * @param integer $options json参数 + * @return string + */ + public function toJson(int $options = JSON_UNESCAPED_UNICODE): string + { + return json_encode($this->toArray(), $options); + } + + public function __toString() + { + return $this->toJson(); + } + + /** + * 转换成数组 + * + * @access public + * @param mixed $items 数据 + * @return array + */ + protected function convertToArray($items): array + { + if ($items instanceof self) { + return $items->all(); + } + + return (array) $items; + } +} diff --git a/vendor/topthink/think-helper/src/contract/Arrayable.php b/vendor/topthink/think-helper/src/contract/Arrayable.php new file mode 100644 index 000000000..7c6b992b0 --- /dev/null +++ b/vendor/topthink/think-helper/src/contract/Arrayable.php @@ -0,0 +1,8 @@ + // +---------------------------------------------------------------------- +use think\Collection; +use think\helper\Arr; -if (!function_exists('classnames')) { +if (!function_exists('throw_if')) { /** - * css样式名生成器 - * classnames("foo", "bar"); // => "foo bar" - * classnames("foo", [ "bar"=> true ]); // => "foo bar" - * classnames([ "foo-bar"=> true ]); // => "foo-bar" - * classnames([ "foo-bar"=> false ]); // => " - * classnames([ "foo" => true ], [ "bar"=> true ]); // => "foo bar" - * classnames([ "foo" => true, "bar"=> true ]); // => "foo bar" - * classnames("foo", [ "bar"=> true, "duck"=> false ], "baz", [ "quux"=> true ]); // => "foo bar baz quux" - * classnames(null, false, "bar", 0, 1, [ "baz"=> null ]); // => "bar 1" + * 按条件抛异常 + * + * @param mixed $condition + * @param Throwable|string $exception + * @param array ...$parameters + * @return mixed + * + * @throws Throwable */ - function classnames() + function throw_if($condition, $exception, ...$parameters) { - $args = func_get_args(); - $classes = array_map(function ($arg) { - if (is_array($arg)) { - return implode(" ", array_filter(array_map(function ($expression, $class) { - return $expression ? $class : false; - }, $arg, array_keys($arg)))); - } - return $arg; - }, $args); - return implode(" ", array_filter($classes)); + if ($condition) { + throw (is_string($exception) ? new $exception(...$parameters) : $exception); + } + + return $condition; } -} \ No newline at end of file +} + +if (!function_exists('throw_unless')) { + /** + * 按条件抛异常 + * + * @param mixed $condition + * @param Throwable|string $exception + * @param array ...$parameters + * @return mixed + * @throws Throwable + */ + function throw_unless($condition, $exception, ...$parameters) + { + if (!$condition) { + throw (is_string($exception) ? new $exception(...$parameters) : $exception); + } + + return $condition; + } +} + +if (!function_exists('tap')) { + /** + * 对一个值调用给定的闭包,然后返回该值 + * + * @param mixed $value + * @param callable|null $callback + * @return mixed + */ + function tap($value, $callback = null) + { + if (is_null($callback)) { + return $value; + } + + $callback($value); + + return $value; + } +} + +if (!function_exists('value')) { + /** + * Return the default value of the given value. + * + * @param mixed $value + * @return mixed + */ + function value($value) + { + return $value instanceof Closure ? $value() : $value; + } +} + +if (!function_exists('collect')) { + /** + * Create a collection from the given value. + * + * @param mixed $value + * @return Collection + */ + function collect($value = null) + { + return new Collection($value); + } +} + +if (!function_exists('data_fill')) { + /** + * Fill in data where it's missing. + * + * @param mixed $target + * @param string|array $key + * @param mixed $value + * @return mixed + */ + function data_fill(&$target, $key, $value) + { + return data_set($target, $key, $value, false); + } +} + +if (!function_exists('data_get')) { + /** + * Get an item from an array or object using "dot" notation. + * + * @param mixed $target + * @param string|array|int $key + * @param mixed $default + * @return mixed + */ + function data_get($target, $key, $default = null) + { + if (is_null($key)) { + return $target; + } + + $key = is_array($key) ? $key : explode('.', $key); + + while (!is_null($segment = array_shift($key))) { + if ('*' === $segment) { + if ($target instanceof Collection) { + $target = $target->all(); + } elseif (!is_array($target)) { + return value($default); + } + + $result = []; + + foreach ($target as $item) { + $result[] = data_get($item, $key); + } + + return in_array('*', $key) ? Arr::collapse($result) : $result; + } + + if (Arr::accessible($target) && Arr::exists($target, $segment)) { + $target = $target[$segment]; + } elseif (is_object($target) && isset($target->{$segment})) { + $target = $target->{$segment}; + } else { + return value($default); + } + } + + return $target; + } +} + +if (!function_exists('data_set')) { + /** + * Set an item on an array or object using dot notation. + * + * @param mixed $target + * @param string|array $key + * @param mixed $value + * @param bool $overwrite + * @return mixed + */ + function data_set(&$target, $key, $value, $overwrite = true) + { + $segments = is_array($key) ? $key : explode('.', $key); + + if (($segment = array_shift($segments)) === '*') { + if (!Arr::accessible($target)) { + $target = []; + } + + if ($segments) { + foreach ($target as &$inner) { + data_set($inner, $segments, $value, $overwrite); + } + } elseif ($overwrite) { + foreach ($target as &$inner) { + $inner = $value; + } + } + } elseif (Arr::accessible($target)) { + if ($segments) { + if (!Arr::exists($target, $segment)) { + $target[$segment] = []; + } + + data_set($target[$segment], $segments, $value, $overwrite); + } elseif ($overwrite || !Arr::exists($target, $segment)) { + $target[$segment] = $value; + } + } elseif (is_object($target)) { + if ($segments) { + if (!isset($target->{$segment})) { + $target->{$segment} = []; + } + + data_set($target->{$segment}, $segments, $value, $overwrite); + } elseif ($overwrite || !isset($target->{$segment})) { + $target->{$segment} = $value; + } + } else { + $target = []; + + if ($segments) { + data_set($target[$segment], $segments, $value, $overwrite); + } elseif ($overwrite) { + $target[$segment] = $value; + } + } + + return $target; + } +} + +if (!function_exists('trait_uses_recursive')) { + /** + * 获取一个trait里所有引用到的trait + * + * @param string $trait Trait + * @return array + */ + function trait_uses_recursive(string $trait): array + { + $traits = class_uses($trait); + foreach ($traits as $trait) { + $traits += trait_uses_recursive($trait); + } + + return $traits; + } +} + +if (!function_exists('class_basename')) { + /** + * 获取类名(不包含命名空间) + * + * @param mixed $class 类名 + * @return string + */ + function class_basename($class): string + { + $class = is_object($class) ? get_class($class) : $class; + return basename(str_replace('\\', '/', $class)); + } +} + +if (!function_exists('class_uses_recursive')) { + /** + *获取一个类里所有用到的trait,包括父类的 + * + * @param mixed $class 类名 + * @return array + */ + function class_uses_recursive($class): array + { + if (is_object($class)) { + $class = get_class($class); + } + + $results = []; + $classes = array_merge([$class => $class], class_parents($class)); + foreach ($classes as $class) { + $results += trait_uses_recursive($class); + } + + return array_unique($results); + } +} diff --git a/vendor/topthink/think-helper/src/helper/Arr.php b/vendor/topthink/think-helper/src/helper/Arr.php new file mode 100644 index 000000000..ed4d6a9ef --- /dev/null +++ b/vendor/topthink/think-helper/src/helper/Arr.php @@ -0,0 +1,634 @@ + +// +---------------------------------------------------------------------- + +namespace think\helper; + +use ArrayAccess; +use InvalidArgumentException; +use think\Collection; + +class Arr +{ + + /** + * Determine whether the given value is array accessible. + * + * @param mixed $value + * @return bool + */ + public static function accessible($value) + { + return is_array($value) || $value instanceof ArrayAccess; + } + + /** + * Add an element to an array using "dot" notation if it doesn't exist. + * + * @param array $array + * @param string $key + * @param mixed $value + * @return array + */ + public static function add($array, $key, $value) + { + if (is_null(static::get($array, $key))) { + static::set($array, $key, $value); + } + + return $array; + } + + /** + * Collapse an array of arrays into a single array. + * + * @param array $array + * @return array + */ + public static function collapse($array) + { + $results = []; + + foreach ($array as $values) { + if ($values instanceof Collection) { + $values = $values->all(); + } elseif (!is_array($values)) { + continue; + } + + $results = array_merge($results, $values); + } + + return $results; + } + + /** + * Cross join the given arrays, returning all possible permutations. + * + * @param array ...$arrays + * @return array + */ + public static function crossJoin(...$arrays) + { + $results = [[]]; + + foreach ($arrays as $index => $array) { + $append = []; + + foreach ($results as $product) { + foreach ($array as $item) { + $product[$index] = $item; + + $append[] = $product; + } + } + + $results = $append; + } + + return $results; + } + + /** + * Divide an array into two arrays. One with keys and the other with values. + * + * @param array $array + * @return array + */ + public static function divide($array) + { + return [array_keys($array), array_values($array)]; + } + + /** + * Flatten a multi-dimensional associative array with dots. + * + * @param array $array + * @param string $prepend + * @return array + */ + public static function dot($array, $prepend = '') + { + $results = []; + + foreach ($array as $key => $value) { + if (is_array($value) && !empty($value)) { + $results = array_merge($results, static::dot($value, $prepend . $key . '.')); + } else { + $results[$prepend . $key] = $value; + } + } + + return $results; + } + + /** + * Get all of the given array except for a specified array of keys. + * + * @param array $array + * @param array|string $keys + * @return array + */ + public static function except($array, $keys) + { + static::forget($array, $keys); + + return $array; + } + + /** + * Determine if the given key exists in the provided array. + * + * @param \ArrayAccess|array $array + * @param string|int $key + * @return bool + */ + public static function exists($array, $key) + { + if ($array instanceof ArrayAccess) { + return $array->offsetExists($key); + } + + return array_key_exists($key, $array); + } + + /** + * Return the first element in an array passing a given truth test. + * + * @param array $array + * @param callable|null $callback + * @param mixed $default + * @return mixed + */ + public static function first($array, callable $callback = null, $default = null) + { + if (is_null($callback)) { + if (empty($array)) { + return value($default); + } + + foreach ($array as $item) { + return $item; + } + } + + foreach ($array as $key => $value) { + if (call_user_func($callback, $value, $key)) { + return $value; + } + } + + return value($default); + } + + /** + * Return the last element in an array passing a given truth test. + * + * @param array $array + * @param callable|null $callback + * @param mixed $default + * @return mixed + */ + public static function last($array, callable $callback = null, $default = null) + { + if (is_null($callback)) { + return empty($array) ? value($default) : end($array); + } + + return static::first(array_reverse($array, true), $callback, $default); + } + + /** + * Flatten a multi-dimensional array into a single level. + * + * @param array $array + * @param int $depth + * @return array + */ + public static function flatten($array, $depth = INF) + { + $result = []; + + foreach ($array as $item) { + $item = $item instanceof Collection ? $item->all() : $item; + + if (!is_array($item)) { + $result[] = $item; + } elseif ($depth === 1) { + $result = array_merge($result, array_values($item)); + } else { + $result = array_merge($result, static::flatten($item, $depth - 1)); + } + } + + return $result; + } + + /** + * Remove one or many array items from a given array using "dot" notation. + * + * @param array $array + * @param array|string $keys + * @return void + */ + public static function forget(&$array, $keys) + { + $original = &$array; + + $keys = (array) $keys; + + if (count($keys) === 0) { + return; + } + + foreach ($keys as $key) { + // if the exact key exists in the top-level, remove it + if (static::exists($array, $key)) { + unset($array[$key]); + + continue; + } + + $parts = explode('.', $key); + + // clean up before each pass + $array = &$original; + + while (count($parts) > 1) { + $part = array_shift($parts); + + if (isset($array[$part]) && is_array($array[$part])) { + $array = &$array[$part]; + } else { + continue 2; + } + } + + unset($array[array_shift($parts)]); + } + } + + /** + * Get an item from an array using "dot" notation. + * + * @param \ArrayAccess|array $array + * @param string $key + * @param mixed $default + * @return mixed + */ + public static function get($array, $key, $default = null) + { + if (!static::accessible($array)) { + return value($default); + } + + if (is_null($key)) { + return $array; + } + + if (static::exists($array, $key)) { + return $array[$key]; + } + + if (strpos($key, '.') === false) { + return $array[$key] ?? value($default); + } + + foreach (explode('.', $key) as $segment) { + if (static::accessible($array) && static::exists($array, $segment)) { + $array = $array[$segment]; + } else { + return value($default); + } + } + + return $array; + } + + /** + * Check if an item or items exist in an array using "dot" notation. + * + * @param \ArrayAccess|array $array + * @param string|array $keys + * @return bool + */ + public static function has($array, $keys) + { + $keys = (array) $keys; + + if (!$array || $keys === []) { + return false; + } + + foreach ($keys as $key) { + $subKeyArray = $array; + + if (static::exists($array, $key)) { + continue; + } + + foreach (explode('.', $key) as $segment) { + if (static::accessible($subKeyArray) && static::exists($subKeyArray, $segment)) { + $subKeyArray = $subKeyArray[$segment]; + } else { + return false; + } + } + } + + return true; + } + + /** + * Determines if an array is associative. + * + * An array is "associative" if it doesn't have sequential numerical keys beginning with zero. + * + * @param array $array + * @return bool + */ + public static function isAssoc(array $array) + { + $keys = array_keys($array); + + return array_keys($keys) !== $keys; + } + + /** + * Get a subset of the items from the given array. + * + * @param array $array + * @param array|string $keys + * @return array + */ + public static function only($array, $keys) + { + return array_intersect_key($array, array_flip((array) $keys)); + } + + /** + * Pluck an array of values from an array. + * + * @param array $array + * @param string|array $value + * @param string|array|null $key + * @return array + */ + public static function pluck($array, $value, $key = null) + { + $results = []; + + [$value, $key] = static::explodePluckParameters($value, $key); + + foreach ($array as $item) { + $itemValue = data_get($item, $value); + + // If the key is "null", we will just append the value to the array and keep + // looping. Otherwise we will key the array using the value of the key we + // received from the developer. Then we'll return the final array form. + if (is_null($key)) { + $results[] = $itemValue; + } else { + $itemKey = data_get($item, $key); + + if (is_object($itemKey) && method_exists($itemKey, '__toString')) { + $itemKey = (string) $itemKey; + } + + $results[$itemKey] = $itemValue; + } + } + + return $results; + } + + /** + * Explode the "value" and "key" arguments passed to "pluck". + * + * @param string|array $value + * @param string|array|null $key + * @return array + */ + protected static function explodePluckParameters($value, $key) + { + $value = is_string($value) ? explode('.', $value) : $value; + + $key = is_null($key) || is_array($key) ? $key : explode('.', $key); + + return [$value, $key]; + } + + /** + * Push an item onto the beginning of an array. + * + * @param array $array + * @param mixed $value + * @param mixed $key + * @return array + */ + public static function prepend($array, $value, $key = null) + { + if (is_null($key)) { + array_unshift($array, $value); + } else { + $array = [$key => $value] + $array; + } + + return $array; + } + + /** + * Get a value from the array, and remove it. + * + * @param array $array + * @param string $key + * @param mixed $default + * @return mixed + */ + public static function pull(&$array, $key, $default = null) + { + $value = static::get($array, $key, $default); + + static::forget($array, $key); + + return $value; + } + + /** + * Get one or a specified number of random values from an array. + * + * @param array $array + * @param int|null $number + * @return mixed + * + * @throws \InvalidArgumentException + */ + public static function random($array, $number = null) + { + $requested = is_null($number) ? 1 : $number; + + $count = count($array); + + if ($requested > $count) { + throw new InvalidArgumentException( + "You requested {$requested} items, but there are only {$count} items available." + ); + } + + if (is_null($number)) { + return $array[array_rand($array)]; + } + + if ((int) $number === 0) { + return []; + } + + $keys = array_rand($array, $number); + + $results = []; + + foreach ((array) $keys as $key) { + $results[] = $array[$key]; + } + + return $results; + } + + /** + * Set an array item to a given value using "dot" notation. + * + * If no key is given to the method, the entire array will be replaced. + * + * @param array $array + * @param string $key + * @param mixed $value + * @return array + */ + public static function set(&$array, $key, $value) + { + if (is_null($key)) { + return $array = $value; + } + + $keys = explode('.', $key); + + while (count($keys) > 1) { + $key = array_shift($keys); + + // If the key doesn't exist at this depth, we will just create an empty array + // to hold the next value, allowing us to create the arrays to hold final + // values at the correct depth. Then we'll keep digging into the array. + if (!isset($array[$key]) || !is_array($array[$key])) { + $array[$key] = []; + } + + $array = &$array[$key]; + } + + $array[array_shift($keys)] = $value; + + return $array; + } + + /** + * Shuffle the given array and return the result. + * + * @param array $array + * @param int|null $seed + * @return array + */ + public static function shuffle($array, $seed = null) + { + if (is_null($seed)) { + shuffle($array); + } else { + srand($seed); + + usort($array, function () { + return rand(-1, 1); + }); + } + + return $array; + } + + /** + * Sort the array using the given callback or "dot" notation. + * + * @param array $array + * @param callable|string|null $callback + * @return array + */ + public static function sort($array, $callback = null) + { + return Collection::make($array)->sort($callback)->all(); + } + + /** + * Recursively sort an array by keys and values. + * + * @param array $array + * @return array + */ + public static function sortRecursive($array) + { + foreach ($array as &$value) { + if (is_array($value)) { + $value = static::sortRecursive($value); + } + } + + if (static::isAssoc($array)) { + ksort($array); + } else { + sort($array); + } + + return $array; + } + + /** + * Convert the array into a query string. + * + * @param array $array + * @return string + */ + public static function query($array) + { + return http_build_query($array, null, '&', PHP_QUERY_RFC3986); + } + + /** + * Filter the array using the given callback. + * + * @param array $array + * @param callable $callback + * @return array + */ + public static function where($array, callable $callback) + { + return array_filter($array, $callback, ARRAY_FILTER_USE_BOTH); + } + + /** + * If the given value is not an array and not null, wrap it in one. + * + * @param mixed $value + * @return array + */ + public static function wrap($value) + { + if (is_null($value)) { + return []; + } + + return is_array($value) ? $value : [$value]; + } +} \ No newline at end of file diff --git a/vendor/topthink/think-helper/src/Str.php b/vendor/topthink/think-helper/src/helper/Str.php similarity index 82% rename from vendor/topthink/think-helper/src/Str.php rename to vendor/topthink/think-helper/src/helper/Str.php index ba56cb44a..b9807c272 100644 --- a/vendor/topthink/think-helper/src/Str.php +++ b/vendor/topthink/think-helper/src/helper/Str.php @@ -25,10 +25,10 @@ class Str * @param string|array $needles * @return bool */ - public static function contains($haystack, $needles) + public static function contains(string $haystack, $needles): bool { foreach ((array) $needles as $needle) { - if ($needle != '' && mb_strpos($haystack, $needle) !== false) { + if ('' != $needle && mb_strpos($haystack, $needle) !== false) { return true; } } @@ -43,7 +43,7 @@ class Str * @param string|array $needles * @return bool */ - public static function endsWith($haystack, $needles) + public static function endsWith(string $haystack, $needles): bool { foreach ((array) $needles as $needle) { if ((string) $needle === static::substr($haystack, -static::length($needle))) { @@ -61,10 +61,10 @@ class Str * @param string|array $needles * @return bool */ - public static function startsWith($haystack, $needles) + public static function startsWith(string $haystack, $needles): bool { foreach ((array) $needles as $needle) { - if ($needle != '' && mb_strpos($haystack, $needle) === 0) { + if ('' != $needle && mb_strpos($haystack, $needle) === 0) { return true; } } @@ -78,7 +78,7 @@ class Str * @param int $length * @return string */ - public static function random($length = 16) + public static function random(int $length = 16): string { $pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; @@ -91,7 +91,7 @@ class Str * @param string $value * @return string */ - public static function lower($value) + public static function lower(string $value): string { return mb_strtolower($value, 'UTF-8'); } @@ -102,7 +102,7 @@ class Str * @param string $value * @return string */ - public static function upper($value) + public static function upper(string $value): string { return mb_strtoupper($value, 'UTF-8'); } @@ -113,7 +113,7 @@ class Str * @param string $value * @return int */ - public static function length($value) + public static function length(string $value): string { return mb_strlen($value); } @@ -126,7 +126,7 @@ class Str * @param int|null $length * @return string */ - public static function substr($string, $start, $length = null) + public static function substr(string $string, int $start, int $length = null): string { return mb_substr($string, $start, $length, 'UTF-8'); } @@ -138,7 +138,7 @@ class Str * @param string $delimiter * @return string */ - public static function snake($value, $delimiter = '_') + public static function snake(string $value, string $delimiter = '_'): string { $key = $value; @@ -161,7 +161,7 @@ class Str * @param string $value * @return string */ - public static function camel($value) + public static function camel(string $value): string { if (isset(static::$camelCache[$value])) { return static::$camelCache[$value]; @@ -176,7 +176,7 @@ class Str * @param string $value * @return string */ - public static function studly($value) + public static function studly(string $value): string { $key = $value; @@ -195,8 +195,8 @@ class Str * @param string $value * @return string */ - public static function title($value) + public static function title(string $value): string { return mb_convert_case($value, MB_CASE_TITLE, 'UTF-8'); } -} \ No newline at end of file +} diff --git a/vendor/zoujingli/think-library/src/Controller.php b/vendor/zoujingli/think-library/src/Controller.php index 960496f83..4cff43d90 100644 --- a/vendor/zoujingli/think-library/src/Controller.php +++ b/vendor/zoujingli/think-library/src/Controller.php @@ -3,7 +3,7 @@ // +---------------------------------------------------------------------- // | Library for ThinkAdmin // +---------------------------------------------------------------------- -// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ] +// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ] // +---------------------------------------------------------------------- // | 官方网站: http://library.thinkadmin.top // +---------------------------------------------------------------------- @@ -191,4 +191,4 @@ class Controller extends \stdClass } } -} \ No newline at end of file +} diff --git a/vendor/zoujingli/think-library/src/File.php b/vendor/zoujingli/think-library/src/File.php index 5a9f684fd..33a3b2509 100644 --- a/vendor/zoujingli/think-library/src/File.php +++ b/vendor/zoujingli/think-library/src/File.php @@ -3,7 +3,7 @@ // +---------------------------------------------------------------------- // | Library for ThinkAdmin // +---------------------------------------------------------------------- -// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ] +// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ] // +---------------------------------------------------------------------- // | 官方网站: http://library.thinkadmin.top // +---------------------------------------------------------------------- diff --git a/vendor/zoujingli/think-library/src/command/Sess.php b/vendor/zoujingli/think-library/src/command/Sess.php index 7d1c4733c..049a26038 100644 --- a/vendor/zoujingli/think-library/src/command/Sess.php +++ b/vendor/zoujingli/think-library/src/command/Sess.php @@ -3,7 +3,7 @@ // +---------------------------------------------------------------------- // | Library for ThinkAdmin // +---------------------------------------------------------------------- -// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ] +// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ] // +---------------------------------------------------------------------- // | 官方网站: http://library.thinkadmin.top // +---------------------------------------------------------------------- @@ -42,4 +42,4 @@ class Sess extends Command $output->writeln('Complete cleaning of invalid session files'); } -} \ No newline at end of file +} diff --git a/vendor/zoujingli/think-library/src/command/Sync.php b/vendor/zoujingli/think-library/src/command/Sync.php index c822368d6..dfbb3c043 100644 --- a/vendor/zoujingli/think-library/src/command/Sync.php +++ b/vendor/zoujingli/think-library/src/command/Sync.php @@ -3,7 +3,7 @@ // +---------------------------------------------------------------------- // | Library for ThinkAdmin // +---------------------------------------------------------------------- -// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ] +// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ] // +---------------------------------------------------------------------- // | 官方网站: http://library.thinkadmin.top // +---------------------------------------------------------------------- diff --git a/vendor/zoujingli/think-library/src/command/Task.php b/vendor/zoujingli/think-library/src/command/Task.php index 3e0af95d3..3b886a898 100644 --- a/vendor/zoujingli/think-library/src/command/Task.php +++ b/vendor/zoujingli/think-library/src/command/Task.php @@ -3,7 +3,7 @@ // +---------------------------------------------------------------------- // | Library for ThinkAdmin // +---------------------------------------------------------------------- -// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ] +// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ] // +---------------------------------------------------------------------- // | 官方网站: http://library.thinkadmin.top // +---------------------------------------------------------------------- @@ -101,4 +101,4 @@ class Task extends Command return PATH_SEPARATOR === ';'; } -} \ No newline at end of file +} diff --git a/vendor/zoujingli/think-library/src/command/sync/Admin.php b/vendor/zoujingli/think-library/src/command/sync/Admin.php index bfc6e9643..3226f5cba 100644 --- a/vendor/zoujingli/think-library/src/command/sync/Admin.php +++ b/vendor/zoujingli/think-library/src/command/sync/Admin.php @@ -3,7 +3,7 @@ // +---------------------------------------------------------------------- // | Library for ThinkAdmin // +---------------------------------------------------------------------- -// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ] +// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ] // +---------------------------------------------------------------------- // | 官方网站: http://library.thinkadmin.top // +---------------------------------------------------------------------- @@ -40,4 +40,4 @@ class Admin extends Sync } } -} \ No newline at end of file +} diff --git a/vendor/zoujingli/think-library/src/command/sync/Config.php b/vendor/zoujingli/think-library/src/command/sync/Config.php index 8610913fc..f8c484fe9 100644 --- a/vendor/zoujingli/think-library/src/command/sync/Config.php +++ b/vendor/zoujingli/think-library/src/command/sync/Config.php @@ -3,7 +3,7 @@ // +---------------------------------------------------------------------- // | Library for ThinkAdmin // +---------------------------------------------------------------------- -// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ] +// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ] // +---------------------------------------------------------------------- // | 官方网站: http://library.thinkadmin.top // +---------------------------------------------------------------------- @@ -39,4 +39,4 @@ class Config extends Sync parent::execute($input, $output); } } -} \ No newline at end of file +} diff --git a/vendor/zoujingli/think-library/src/command/sync/Plugs.php b/vendor/zoujingli/think-library/src/command/sync/Plugs.php index ed3a4e824..e696440ef 100644 --- a/vendor/zoujingli/think-library/src/command/sync/Plugs.php +++ b/vendor/zoujingli/think-library/src/command/sync/Plugs.php @@ -3,7 +3,7 @@ // +---------------------------------------------------------------------- // | Library for ThinkAdmin // +---------------------------------------------------------------------- -// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ] +// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ] // +---------------------------------------------------------------------- // | 官方网站: http://library.thinkadmin.top // +---------------------------------------------------------------------- @@ -39,4 +39,4 @@ class Plugs extends Sync parent::execute($input, $output); } } -} \ No newline at end of file +} diff --git a/vendor/zoujingli/think-library/src/command/sync/Service.php b/vendor/zoujingli/think-library/src/command/sync/Service.php index 89e2d2695..1bac58649 100644 --- a/vendor/zoujingli/think-library/src/command/sync/Service.php +++ b/vendor/zoujingli/think-library/src/command/sync/Service.php @@ -3,7 +3,7 @@ // +---------------------------------------------------------------------- // | Library for ThinkAdmin // +---------------------------------------------------------------------- -// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ] +// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ] // +---------------------------------------------------------------------- // | 官方网站: http://library.thinkadmin.top // +---------------------------------------------------------------------- @@ -39,4 +39,4 @@ class Service extends Sync parent::execute($input, $output); } } -} \ No newline at end of file +} diff --git a/vendor/zoujingli/think-library/src/command/sync/Wechat.php b/vendor/zoujingli/think-library/src/command/sync/Wechat.php index 7fe28af6a..e0132b741 100644 --- a/vendor/zoujingli/think-library/src/command/sync/Wechat.php +++ b/vendor/zoujingli/think-library/src/command/sync/Wechat.php @@ -3,7 +3,7 @@ // +---------------------------------------------------------------------- // | Library for ThinkAdmin // +---------------------------------------------------------------------- -// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ] +// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ] // +---------------------------------------------------------------------- // | 官方网站: http://library.thinkadmin.top // +---------------------------------------------------------------------- @@ -39,4 +39,4 @@ class Wechat extends Sync parent::execute($input, $output); } } -} \ No newline at end of file +} diff --git a/vendor/zoujingli/think-library/src/command/task/Reset.php b/vendor/zoujingli/think-library/src/command/task/Reset.php index 7da0ceb24..c28a3de0d 100644 --- a/vendor/zoujingli/think-library/src/command/task/Reset.php +++ b/vendor/zoujingli/think-library/src/command/task/Reset.php @@ -3,7 +3,7 @@ // +---------------------------------------------------------------------- // | Library for ThinkAdmin // +---------------------------------------------------------------------- -// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ] +// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ] // +---------------------------------------------------------------------- // | 官方网站: http://library.thinkadmin.top // +---------------------------------------------------------------------- @@ -41,4 +41,4 @@ class Reset extends Task $output->error('message queue daemon creation failed, try again later!'); } } -} \ No newline at end of file +} diff --git a/vendor/zoujingli/think-library/src/command/task/Start.php b/vendor/zoujingli/think-library/src/command/task/Start.php index 364b2e788..6c4f0366d 100644 --- a/vendor/zoujingli/think-library/src/command/task/Start.php +++ b/vendor/zoujingli/think-library/src/command/task/Start.php @@ -3,7 +3,7 @@ // +---------------------------------------------------------------------- // | Library for ThinkAdmin // +---------------------------------------------------------------------- -// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ] +// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ] // +---------------------------------------------------------------------- // | 官方网站: http://library.thinkadmin.top // +---------------------------------------------------------------------- @@ -42,4 +42,4 @@ class Start extends Task } } -} \ No newline at end of file +} diff --git a/vendor/zoujingli/think-library/src/command/task/State.php b/vendor/zoujingli/think-library/src/command/task/State.php index f9c9f189f..2f4195154 100644 --- a/vendor/zoujingli/think-library/src/command/task/State.php +++ b/vendor/zoujingli/think-library/src/command/task/State.php @@ -3,7 +3,7 @@ // +---------------------------------------------------------------------- // | Library for ThinkAdmin // +---------------------------------------------------------------------- -// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ] +// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ] // +---------------------------------------------------------------------- // | 官方网站: http://library.thinkadmin.top // +---------------------------------------------------------------------- @@ -37,4 +37,4 @@ class State extends Task } } -} \ No newline at end of file +} diff --git a/vendor/zoujingli/think-library/src/command/task/Stop.php b/vendor/zoujingli/think-library/src/command/task/Stop.php index e838fe643..a1584e3ba 100644 --- a/vendor/zoujingli/think-library/src/command/task/Stop.php +++ b/vendor/zoujingli/think-library/src/command/task/Stop.php @@ -3,7 +3,7 @@ // +---------------------------------------------------------------------- // | Library for ThinkAdmin // +---------------------------------------------------------------------- -// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ] +// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ] // +---------------------------------------------------------------------- // | 官方网站: http://library.thinkadmin.top // +---------------------------------------------------------------------- @@ -38,4 +38,4 @@ class Stop extends Task } } -} \ No newline at end of file +} diff --git a/vendor/zoujingli/think-library/src/common.php b/vendor/zoujingli/think-library/src/common.php index 5ee356146..ac12e8909 100644 --- a/vendor/zoujingli/think-library/src/common.php +++ b/vendor/zoujingli/think-library/src/common.php @@ -3,7 +3,7 @@ // +---------------------------------------------------------------------- // | Library for ThinkAdmin // +---------------------------------------------------------------------- -// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ] +// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ] // +---------------------------------------------------------------------- // | 官方网站: http://library.thinkadmin.top // +---------------------------------------------------------------------- @@ -263,4 +263,4 @@ Middleware::add(function (Request $request, \Closure $next, $header = []) { if (function_exists('think\__include_file')) { $root = rtrim(str_replace('\\', '/', env('app_path')), '/'); foreach (glob("{$root}/*/sys.php") as $file) \think\__include_file($file); -} \ No newline at end of file +} diff --git a/vendor/zoujingli/think-library/src/driver/Local.php b/vendor/zoujingli/think-library/src/driver/Local.php index ee29099bb..694c64bce 100644 --- a/vendor/zoujingli/think-library/src/driver/Local.php +++ b/vendor/zoujingli/think-library/src/driver/Local.php @@ -3,7 +3,7 @@ // +---------------------------------------------------------------------- // | Library for ThinkAdmin // +---------------------------------------------------------------------- -// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ] +// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ] // +---------------------------------------------------------------------- // | 官方网站: http://library.thinkadmin.top // +---------------------------------------------------------------------- @@ -140,4 +140,4 @@ class Local extends File return true; } -} \ No newline at end of file +} diff --git a/vendor/zoujingli/think-library/src/driver/Oss.php b/vendor/zoujingli/think-library/src/driver/Oss.php index 39f651bb2..012ae8e40 100644 --- a/vendor/zoujingli/think-library/src/driver/Oss.php +++ b/vendor/zoujingli/think-library/src/driver/Oss.php @@ -3,7 +3,7 @@ // +---------------------------------------------------------------------- // | Library for ThinkAdmin // +---------------------------------------------------------------------- -// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ] +// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ] // +---------------------------------------------------------------------- // | 官方网站: http://library.thinkadmin.top // +---------------------------------------------------------------------- @@ -198,4 +198,4 @@ class Oss extends File return new OssClient($keyid, $secret, $endpoint); } -} \ No newline at end of file +} diff --git a/vendor/zoujingli/think-library/src/driver/Qiniu.php b/vendor/zoujingli/think-library/src/driver/Qiniu.php index 2fecb8036..6a8fe85f5 100644 --- a/vendor/zoujingli/think-library/src/driver/Qiniu.php +++ b/vendor/zoujingli/think-library/src/driver/Qiniu.php @@ -3,7 +3,7 @@ // +---------------------------------------------------------------------- // | Library for ThinkAdmin // +---------------------------------------------------------------------- -// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ] +// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ] // +---------------------------------------------------------------------- // | 官方网站: http://library.thinkadmin.top // +---------------------------------------------------------------------- @@ -202,4 +202,4 @@ class Qiniu extends File ); } -} \ No newline at end of file +} diff --git a/vendor/zoujingli/think-library/src/logic/Delete.php b/vendor/zoujingli/think-library/src/logic/Delete.php index d527aecbd..e66c55f37 100644 --- a/vendor/zoujingli/think-library/src/logic/Delete.php +++ b/vendor/zoujingli/think-library/src/logic/Delete.php @@ -3,7 +3,7 @@ // +---------------------------------------------------------------------- // | Library for ThinkAdmin // +---------------------------------------------------------------------- -// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ] +// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ] // +---------------------------------------------------------------------- // | 官方网站: http://library.thinkadmin.top // +---------------------------------------------------------------------- @@ -93,4 +93,4 @@ class Delete extends Logic } } -} \ No newline at end of file +} diff --git a/vendor/zoujingli/think-library/src/logic/Form.php b/vendor/zoujingli/think-library/src/logic/Form.php index 3c0d1c7e9..4762a61b7 100644 --- a/vendor/zoujingli/think-library/src/logic/Form.php +++ b/vendor/zoujingli/think-library/src/logic/Form.php @@ -3,7 +3,7 @@ // +---------------------------------------------------------------------- // | Library for ThinkAdmin // +---------------------------------------------------------------------- -// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ] +// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ] // +---------------------------------------------------------------------- // | 官方网站: http://library.thinkadmin.top // +---------------------------------------------------------------------- @@ -111,4 +111,4 @@ class Form extends Logic } } -} \ No newline at end of file +} diff --git a/vendor/zoujingli/think-library/src/logic/Input.php b/vendor/zoujingli/think-library/src/logic/Input.php index 71183d99d..562ee51a9 100644 --- a/vendor/zoujingli/think-library/src/logic/Input.php +++ b/vendor/zoujingli/think-library/src/logic/Input.php @@ -3,7 +3,7 @@ // +---------------------------------------------------------------------- // | Library for ThinkAdmin // +---------------------------------------------------------------------- -// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ] +// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ] // +---------------------------------------------------------------------- // | 官方网站: http://library.thinkadmin.top // +---------------------------------------------------------------------- @@ -93,4 +93,4 @@ class Input extends Logic } } -} \ No newline at end of file +} diff --git a/vendor/zoujingli/think-library/src/logic/Logic.php b/vendor/zoujingli/think-library/src/logic/Logic.php index fdb681afd..362c9f2b4 100644 --- a/vendor/zoujingli/think-library/src/logic/Logic.php +++ b/vendor/zoujingli/think-library/src/logic/Logic.php @@ -3,7 +3,7 @@ // +---------------------------------------------------------------------- // | Library for ThinkAdmin // +---------------------------------------------------------------------- -// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ] +// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ] // +---------------------------------------------------------------------- // | 官方网站: http://library.thinkadmin.top // +---------------------------------------------------------------------- @@ -53,4 +53,4 @@ abstract class Logic return is_string($dbQuery) ? Db::name($dbQuery) : $dbQuery; } -} \ No newline at end of file +} diff --git a/vendor/zoujingli/think-library/src/logic/Page.php b/vendor/zoujingli/think-library/src/logic/Page.php index c51611c49..9d1d3d833 100644 --- a/vendor/zoujingli/think-library/src/logic/Page.php +++ b/vendor/zoujingli/think-library/src/logic/Page.php @@ -3,7 +3,7 @@ // +---------------------------------------------------------------------- // | Library for ThinkAdmin // +---------------------------------------------------------------------- -// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ] +// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ] // +---------------------------------------------------------------------- // | 官方网站: http://library.thinkadmin.top // +---------------------------------------------------------------------- @@ -139,4 +139,4 @@ class Page extends Logic } } -} \ No newline at end of file +} diff --git a/vendor/zoujingli/think-library/src/logic/Query.php b/vendor/zoujingli/think-library/src/logic/Query.php index 9cf511536..8214ba213 100644 --- a/vendor/zoujingli/think-library/src/logic/Query.php +++ b/vendor/zoujingli/think-library/src/logic/Query.php @@ -3,7 +3,7 @@ // +---------------------------------------------------------------------- // | Library for ThinkAdmin // +---------------------------------------------------------------------- -// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ] +// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ] // +---------------------------------------------------------------------- // | 官方网站: http://library.thinkadmin.top // +---------------------------------------------------------------------- diff --git a/vendor/zoujingli/think-library/src/logic/Save.php b/vendor/zoujingli/think-library/src/logic/Save.php index f3b0f934b..a880115a6 100644 --- a/vendor/zoujingli/think-library/src/logic/Save.php +++ b/vendor/zoujingli/think-library/src/logic/Save.php @@ -3,7 +3,7 @@ // +---------------------------------------------------------------------- // | Library for ThinkAdmin // +---------------------------------------------------------------------- -// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ] +// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ] // +---------------------------------------------------------------------- // | 官方网站: http://library.thinkadmin.top // +---------------------------------------------------------------------- diff --git a/vendor/zoujingli/think-library/src/tools/Crypt.php b/vendor/zoujingli/think-library/src/tools/Crypt.php index f3cdd6bde..39b5ad910 100644 --- a/vendor/zoujingli/think-library/src/tools/Crypt.php +++ b/vendor/zoujingli/think-library/src/tools/Crypt.php @@ -3,7 +3,7 @@ // +---------------------------------------------------------------------- // | Library for ThinkAdmin // +---------------------------------------------------------------------- -// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ] +// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ] // +---------------------------------------------------------------------- // | 官方网站: http://library.thinkadmin.top // +---------------------------------------------------------------------- @@ -62,4 +62,4 @@ class Crypt } } } -} \ No newline at end of file +} diff --git a/vendor/zoujingli/think-library/src/tools/Csrf.php b/vendor/zoujingli/think-library/src/tools/Csrf.php index 9ffb65829..9032eaf1a 100644 --- a/vendor/zoujingli/think-library/src/tools/Csrf.php +++ b/vendor/zoujingli/think-library/src/tools/Csrf.php @@ -3,7 +3,7 @@ // +---------------------------------------------------------------------- // | Library for ThinkAdmin // +---------------------------------------------------------------------- -// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ] +// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ] // +---------------------------------------------------------------------- // | 官方网站: http://library.thinkadmin.top // +---------------------------------------------------------------------- @@ -90,4 +90,4 @@ class Csrf }, $html); })); } -} \ No newline at end of file +} diff --git a/vendor/zoujingli/think-library/src/tools/Csv.php b/vendor/zoujingli/think-library/src/tools/Csv.php index fb2deaa0d..f951d7a9c 100644 --- a/vendor/zoujingli/think-library/src/tools/Csv.php +++ b/vendor/zoujingli/think-library/src/tools/Csv.php @@ -3,7 +3,7 @@ // +---------------------------------------------------------------------- // | Library for ThinkAdmin // +---------------------------------------------------------------------- -// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ] +// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ] // +---------------------------------------------------------------------- // | 官方网站: http://library.thinkadmin.top // +---------------------------------------------------------------------- @@ -64,4 +64,4 @@ class Csv while ($key = array_shift($attr)) $temp = isset($temp[$key]) ? $temp[$key] : $temp; return (is_string($temp) || is_numeric($temp)) ? @iconv('utf-8', 'gbk//TRANSLIT', "{$temp}") : ''; } -} \ No newline at end of file +} diff --git a/vendor/zoujingli/think-library/src/tools/Data.php b/vendor/zoujingli/think-library/src/tools/Data.php index ee1c927da..09f9d6531 100644 --- a/vendor/zoujingli/think-library/src/tools/Data.php +++ b/vendor/zoujingli/think-library/src/tools/Data.php @@ -3,7 +3,7 @@ // +---------------------------------------------------------------------- // | Library for ThinkAdmin // +---------------------------------------------------------------------- -// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ] +// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ] // +---------------------------------------------------------------------- // | 官方网站: http://library.thinkadmin.top // +---------------------------------------------------------------------- @@ -189,4 +189,4 @@ class Data while ($size >= 1024 && $pos < 6) if (++$pos) $size /= 1024; return round($size, $dec) . ' ' . $map[$pos]; } -} \ No newline at end of file +} diff --git a/vendor/zoujingli/think-library/src/tools/Emoji.php b/vendor/zoujingli/think-library/src/tools/Emoji.php index 678eb9cb8..7c340ff19 100644 --- a/vendor/zoujingli/think-library/src/tools/Emoji.php +++ b/vendor/zoujingli/think-library/src/tools/Emoji.php @@ -3,7 +3,7 @@ // +---------------------------------------------------------------------- // | Library for ThinkAdmin // +---------------------------------------------------------------------- -// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ] +// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ] // +---------------------------------------------------------------------- // | 官方网站: http://library.thinkadmin.top // +---------------------------------------------------------------------- @@ -56,4 +56,4 @@ class Emoji return strlen($match[0]) >= 4 ? '' : $match[0]; }, $content); } -} \ No newline at end of file +} diff --git a/vendor/zoujingli/think-library/src/tools/Express.php b/vendor/zoujingli/think-library/src/tools/Express.php index 38b42f429..619ac7e06 100644 --- a/vendor/zoujingli/think-library/src/tools/Express.php +++ b/vendor/zoujingli/think-library/src/tools/Express.php @@ -3,7 +3,7 @@ // +---------------------------------------------------------------------- // | Library for ThinkAdmin // +---------------------------------------------------------------------- -// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ] +// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ] // +---------------------------------------------------------------------- // | 官方网站: http://library.thinkadmin.top // +---------------------------------------------------------------------- @@ -46,4 +46,4 @@ class Express return ['message' => 'ok', 'com' => $code, 'nu' => $number, 'data' => $list]; } -} \ No newline at end of file +} diff --git a/vendor/zoujingli/think-library/src/tools/Http.php b/vendor/zoujingli/think-library/src/tools/Http.php index 4263b582f..767b209d0 100644 --- a/vendor/zoujingli/think-library/src/tools/Http.php +++ b/vendor/zoujingli/think-library/src/tools/Http.php @@ -3,7 +3,7 @@ // +---------------------------------------------------------------------- // | Library for ThinkAdmin // +---------------------------------------------------------------------- -// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ] +// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ] // +---------------------------------------------------------------------- // | 官方网站: http://library.thinkadmin.top // +---------------------------------------------------------------------- @@ -139,4 +139,4 @@ class Http return $userAgents[array_rand($userAgents, 1)]; } -} \ No newline at end of file +} diff --git a/vendor/zoujingli/think-library/src/tools/Node.php b/vendor/zoujingli/think-library/src/tools/Node.php index fac383e65..47d4aabae 100644 --- a/vendor/zoujingli/think-library/src/tools/Node.php +++ b/vendor/zoujingli/think-library/src/tools/Node.php @@ -3,7 +3,7 @@ // +---------------------------------------------------------------------- // | Library for ThinkAdmin // +---------------------------------------------------------------------- -// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ] +// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ] // +---------------------------------------------------------------------- // | 官方网站: http://library.thinkadmin.top // +---------------------------------------------------------------------- @@ -193,4 +193,4 @@ class Node return $total; } -} \ No newline at end of file +} diff --git a/vendor/zoujingli/think-library/src/tools/Options.php b/vendor/zoujingli/think-library/src/tools/Options.php index edf779a80..c770b94a4 100644 --- a/vendor/zoujingli/think-library/src/tools/Options.php +++ b/vendor/zoujingli/think-library/src/tools/Options.php @@ -3,7 +3,7 @@ // +---------------------------------------------------------------------- // | Library for ThinkAdmin // +---------------------------------------------------------------------- -// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ] +// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ] // +---------------------------------------------------------------------- // | 官方网站: http://library.thinkadmin.top // +---------------------------------------------------------------------- @@ -134,4 +134,4 @@ class Options implements \ArrayAccess { $this->del($offset); } -} \ No newline at end of file +} diff --git a/vendor/zoujingli/weopen-developer/README.md b/vendor/zoujingli/weopen-developer/README.md index 0cfff9b84..894004423 100644 --- a/vendor/zoujingli/weopen-developer/README.md +++ b/vendor/zoujingli/weopen-developer/README.md @@ -124,4 +124,4 @@ Copyright Sponsor -- -![赞助](http://zoujingli.oschina.io/static/pay.png) +![赞助](http://static.thinkadmin.top/pay.png)