From f6c6145d58241b10e1ef12eb48f77ad192fc6bbc Mon Sep 17 00:00:00 2001 From: wanghongjun <1445693971@qq,com> Date: Tue, 24 Oct 2023 11:09:41 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E7=BD=B2=E5=88=B0git?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/weliam_smartcity/composer.json | 9 + addons/weliam_smartcity/composer.lock | 1937 ++++++++++ addons/weliam_smartcity/icon.jpg | Bin 0 -> 63752 bytes addons/weliam_smartcity/install.php | 11 + addons/weliam_smartcity/manifest.xml | 40 + addons/weliam_smartcity/module.php | 20 + addons/weliam_smartcity/processor.php | 61 + addons/weliam_smartcity/receiver.php | 373 ++ addons/weliam_smartcity/site.php | 174 + addons/weliam_smartcity/uniapp.php | 3201 +++++++++++++++++ .../event-dispatcher-contracts/Event.php | 96 + .../EventDispatcherInterface.php | 58 + .../event-dispatcher-contracts/LICENSE | 19 + .../event-dispatcher-contracts/README.md | 9 + .../event-dispatcher-contracts/composer.json | 34 + .../vendor/symfony/polyfill-intl-idn/Idn.php | 283 ++ .../vendor/symfony/polyfill-intl-idn/LICENSE | 19 + .../symfony/polyfill-intl-idn/README.md | 12 + .../symfony/polyfill-intl-idn/bootstrap.php | 59 + .../symfony/polyfill-intl-idn/composer.json | 36 + .../vendor/symfony/polyfill-mbstring/LICENSE | 19 + .../symfony/polyfill-mbstring/Mbstring.php | 829 +++++ .../symfony/polyfill-mbstring/README.md | 13 + .../Resources/unidata/lowerCase.php | 1096 ++++++ .../Resources/unidata/titleCaseRegexp.php | 5 + .../Resources/unidata/upperCase.php | 1104 ++++++ .../symfony/polyfill-mbstring/bootstrap.php | 62 + .../symfony/polyfill-mbstring/composer.json | 34 + .../vendor/symfony/polyfill-php72/LICENSE | 19 + .../vendor/symfony/polyfill-php72/Php72.php | 216 ++ .../vendor/symfony/polyfill-php72/README.md | 27 + .../symfony/polyfill-php72/bootstrap.php | 36 + .../symfony/polyfill-php72/composer.json | 31 + .../psr-http-message-bridge/.gitignore | 4 + .../psr-http-message-bridge/.php_cs.dist | 24 + .../psr-http-message-bridge/.travis.yml | 47 + .../psr-http-message-bridge/CHANGELOG.md | 18 + .../Factory/DiactorosFactory.php | 175 + .../Factory/HttpFoundationFactory.php | 280 ++ .../Factory/PsrHttpFactory.php | 172 + .../HttpFoundationFactoryInterface.php | 43 + .../HttpMessageFactoryInterface.php | 43 + .../symfony/psr-http-message-bridge/LICENSE | 19 + .../symfony/psr-http-message-bridge/README.md | 20 + .../AbstractHttpMessageFactoryTest.php | 229 ++ .../Tests/Factory/DiactorosFactoryTest.php | 32 + .../Factory/HttpFoundationFactoryTest.php | 250 ++ .../Tests/Factory/PsrHttpFactoryTest.php | 29 + .../Tests/Fixtures/Message.php | 93 + .../Tests/Fixtures/Response.php | 45 + .../Tests/Fixtures/ServerRequest.php | 141 + .../Tests/Fixtures/Stream.php | 99 + .../Tests/Fixtures/UploadedFile.php | 65 + .../Tests/Fixtures/Uri.php | 135 + .../Tests/Functional/CovertTest.php | 239 ++ .../psr-http-message-bridge/composer.json | 42 + .../psr-http-message-bridge/phpunit.xml.dist | 30 + .../vendor/symfony/service-contracts/LICENSE | 19 + .../symfony/service-contracts/README.md | 9 + .../service-contracts/ResetInterface.php | 30 + .../service-contracts/ServiceLocatorTrait.php | 122 + .../ServiceProviderInterface.php | 36 + .../ServiceSubscriberInterface.php | 53 + .../ServiceSubscriberTrait.php | 63 + .../Test/ServiceLocatorTest.php | 92 + .../symfony/service-contracts/composer.json | 34 + .../vendor/symfony/var-exporter/.gitignore | 3 + .../vendor/symfony/var-exporter/CHANGELOG.md | 7 + .../Exception/ClassNotFoundException.php | 20 + .../Exception/ExceptionInterface.php | 16 + .../NotInstantiableTypeException.php | 20 + .../symfony/var-exporter/Instantiator.php | 94 + .../var-exporter/Internal/Exporter.php | 406 +++ .../var-exporter/Internal/Hydrator.php | 151 + .../var-exporter/Internal/Reference.php | 30 + .../var-exporter/Internal/Registry.php | 136 + .../symfony/var-exporter/Internal/Values.php | 27 + .../vendor/symfony/var-exporter/LICENSE | 19 + .../vendor/symfony/var-exporter/README.md | 38 + .../Tests/Fixtures/abstract-parent.php | 20 + .../Tests/Fixtures/array-iterator-legacy.php | 22 + .../Tests/Fixtures/array-iterator.php | 19 + .../Fixtures/array-object-custom-legacy.php | 22 + .../Tests/Fixtures/array-object-custom.php | 21 + .../Tests/Fixtures/array-object-legacy.php | 29 + .../Tests/Fixtures/array-object.php | 28 + .../var-exporter/Tests/Fixtures/bool.php | 3 + .../var-exporter/Tests/Fixtures/clone.php | 15 + .../var-exporter/Tests/Fixtures/datetime.php | 25 + .../var-exporter/Tests/Fixtures/error.php | 30 + .../Tests/Fixtures/external-references.php | 7 + .../Fixtures/final-array-iterator-legacy.php | 11 + .../Tests/Fixtures/final-array-iterator.php | 17 + .../Tests/Fixtures/final-error-legacy.php | 27 + .../Tests/Fixtures/final-error.php | 27 + .../Tests/Fixtures/final-stdclass.php | 11 + .../Tests/Fixtures/foo-serializable.php | 11 + .../Fixtures/hard-references-recursive.php | 16 + .../Tests/Fixtures/hard-references.php | 18 + .../Tests/Fixtures/incomplete-class.php | 11 + .../Tests/Fixtures/multiline-string.php | 8 + .../Fixtures/partially-indexed-array.php | 8 + .../Tests/Fixtures/php74-serializable.php | 16 + .../Tests/Fixtures/private-constructor.php | 17 + .../var-exporter/Tests/Fixtures/private.php | 26 + .../Tests/Fixtures/serializable.php | 14 + .../Tests/Fixtures/simple-array.php | 8 + .../Fixtures/spl-object-storage-legacy.php | 21 + .../Tests/Fixtures/spl-object-storage.php | 20 + .../Tests/Fixtures/var-on-sleep.php | 17 + .../Tests/Fixtures/wakeup-refl.php | 13 + .../var-exporter/Tests/Fixtures/wakeup.php | 25 + .../var-exporter/Tests/InstantiatorTest.php | 73 + .../var-exporter/Tests/VarExporterTest.php | 427 +++ .../symfony/var-exporter/VarExporter.php | 114 + .../vendor/symfony/var-exporter/composer.json | 36 + .../symfony/var-exporter/phpunit.xml.dist | 31 + addons/weliam_smartcity/version.php | 1 + 118 files changed, 14906 insertions(+) create mode 100644 addons/weliam_smartcity/composer.json create mode 100644 addons/weliam_smartcity/composer.lock create mode 100644 addons/weliam_smartcity/icon.jpg create mode 100644 addons/weliam_smartcity/install.php create mode 100644 addons/weliam_smartcity/manifest.xml create mode 100644 addons/weliam_smartcity/module.php create mode 100644 addons/weliam_smartcity/processor.php create mode 100644 addons/weliam_smartcity/receiver.php create mode 100644 addons/weliam_smartcity/site.php create mode 100644 addons/weliam_smartcity/uniapp.php create mode 100644 addons/weliam_smartcity/vendor/symfony/event-dispatcher-contracts/Event.php create mode 100644 addons/weliam_smartcity/vendor/symfony/event-dispatcher-contracts/EventDispatcherInterface.php create mode 100644 addons/weliam_smartcity/vendor/symfony/event-dispatcher-contracts/LICENSE create mode 100644 addons/weliam_smartcity/vendor/symfony/event-dispatcher-contracts/README.md create mode 100644 addons/weliam_smartcity/vendor/symfony/event-dispatcher-contracts/composer.json create mode 100644 addons/weliam_smartcity/vendor/symfony/polyfill-intl-idn/Idn.php create mode 100644 addons/weliam_smartcity/vendor/symfony/polyfill-intl-idn/LICENSE create mode 100644 addons/weliam_smartcity/vendor/symfony/polyfill-intl-idn/README.md create mode 100644 addons/weliam_smartcity/vendor/symfony/polyfill-intl-idn/bootstrap.php create mode 100644 addons/weliam_smartcity/vendor/symfony/polyfill-intl-idn/composer.json create mode 100644 addons/weliam_smartcity/vendor/symfony/polyfill-mbstring/LICENSE create mode 100644 addons/weliam_smartcity/vendor/symfony/polyfill-mbstring/Mbstring.php create mode 100644 addons/weliam_smartcity/vendor/symfony/polyfill-mbstring/README.md create mode 100644 addons/weliam_smartcity/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php create mode 100644 addons/weliam_smartcity/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php create mode 100644 addons/weliam_smartcity/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php create mode 100644 addons/weliam_smartcity/vendor/symfony/polyfill-mbstring/bootstrap.php create mode 100644 addons/weliam_smartcity/vendor/symfony/polyfill-mbstring/composer.json create mode 100644 addons/weliam_smartcity/vendor/symfony/polyfill-php72/LICENSE create mode 100644 addons/weliam_smartcity/vendor/symfony/polyfill-php72/Php72.php create mode 100644 addons/weliam_smartcity/vendor/symfony/polyfill-php72/README.md create mode 100644 addons/weliam_smartcity/vendor/symfony/polyfill-php72/bootstrap.php create mode 100644 addons/weliam_smartcity/vendor/symfony/polyfill-php72/composer.json create mode 100644 addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/.gitignore create mode 100644 addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/.php_cs.dist create mode 100644 addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/.travis.yml create mode 100644 addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/CHANGELOG.md create mode 100644 addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Factory/DiactorosFactory.php create mode 100644 addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Factory/HttpFoundationFactory.php create mode 100644 addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Factory/PsrHttpFactory.php create mode 100644 addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/HttpFoundationFactoryInterface.php create mode 100644 addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/HttpMessageFactoryInterface.php create mode 100644 addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/LICENSE create mode 100644 addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/README.md create mode 100644 addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Factory/AbstractHttpMessageFactoryTest.php create mode 100644 addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Factory/DiactorosFactoryTest.php create mode 100644 addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Factory/HttpFoundationFactoryTest.php create mode 100644 addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Factory/PsrHttpFactoryTest.php create mode 100644 addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Fixtures/Message.php create mode 100644 addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Fixtures/Response.php create mode 100644 addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Fixtures/ServerRequest.php create mode 100644 addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Fixtures/Stream.php create mode 100644 addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Fixtures/UploadedFile.php create mode 100644 addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Fixtures/Uri.php create mode 100644 addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Functional/CovertTest.php create mode 100644 addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/composer.json create mode 100644 addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/phpunit.xml.dist create mode 100644 addons/weliam_smartcity/vendor/symfony/service-contracts/LICENSE create mode 100644 addons/weliam_smartcity/vendor/symfony/service-contracts/README.md create mode 100644 addons/weliam_smartcity/vendor/symfony/service-contracts/ResetInterface.php create mode 100644 addons/weliam_smartcity/vendor/symfony/service-contracts/ServiceLocatorTrait.php create mode 100644 addons/weliam_smartcity/vendor/symfony/service-contracts/ServiceProviderInterface.php create mode 100644 addons/weliam_smartcity/vendor/symfony/service-contracts/ServiceSubscriberInterface.php create mode 100644 addons/weliam_smartcity/vendor/symfony/service-contracts/ServiceSubscriberTrait.php create mode 100644 addons/weliam_smartcity/vendor/symfony/service-contracts/Test/ServiceLocatorTest.php create mode 100644 addons/weliam_smartcity/vendor/symfony/service-contracts/composer.json create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/.gitignore create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/CHANGELOG.md create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Exception/ClassNotFoundException.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Exception/ExceptionInterface.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Exception/NotInstantiableTypeException.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Instantiator.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Internal/Exporter.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Internal/Hydrator.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Internal/Reference.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Internal/Registry.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Internal/Values.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/LICENSE create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/README.md create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/abstract-parent.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/array-iterator-legacy.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/array-iterator.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/array-object-custom-legacy.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/array-object-custom.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/array-object-legacy.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/array-object.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/bool.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/clone.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/datetime.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/error.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/external-references.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/final-array-iterator-legacy.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/final-array-iterator.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/final-error-legacy.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/final-error.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/final-stdclass.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/foo-serializable.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/hard-references-recursive.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/hard-references.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/incomplete-class.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/multiline-string.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/partially-indexed-array.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/php74-serializable.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/private-constructor.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/private.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/serializable.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/simple-array.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/spl-object-storage-legacy.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/spl-object-storage.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/var-on-sleep.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/wakeup-refl.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/wakeup.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/InstantiatorTest.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/VarExporterTest.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/VarExporter.php create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/composer.json create mode 100644 addons/weliam_smartcity/vendor/symfony/var-exporter/phpunit.xml.dist create mode 100644 addons/weliam_smartcity/version.php diff --git a/addons/weliam_smartcity/composer.json b/addons/weliam_smartcity/composer.json new file mode 100644 index 0000000..81a94ed --- /dev/null +++ b/addons/weliam_smartcity/composer.json @@ -0,0 +1,9 @@ +{ + "require": { + "yansongda/pay": "^2.8", + "overtrue/wechat": "~4.0", + "qiniu/php-sdk": "^7.2", + "workerman/workerman": "^4.0", + "workerman/mysql": "^1.0" + } +} diff --git a/addons/weliam_smartcity/composer.lock b/addons/weliam_smartcity/composer.lock new file mode 100644 index 0000000..8890907 --- /dev/null +++ b/addons/weliam_smartcity/composer.lock @@ -0,0 +1,1937 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "340aef426699056ed704193d5fae4720", + "packages": [ + { + "name": "easywechat-composer/easywechat-composer", + "version": "1.1.6", + "source": { + "type": "git", + "url": "https://github.com/mingyoung/easywechat-composer.git", + "reference": "970144fd245e62869edd60db6cc477053219d891" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mingyoung/easywechat-composer/zipball/970144fd245e62869edd60db6cc477053219d891", + "reference": "970144fd245e62869edd60db6cc477053219d891", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "composer-plugin-api": "^1.0", + "php": ">=7.0" + }, + "require-dev": { + "composer/composer": "^1.0", + "phpunit/phpunit": "^6.5 || ^7.0" + }, + "type": "composer-plugin", + "extra": { + "class": "EasyWeChatComposer\\Plugin" + }, + "autoload": { + "psr-4": { + "EasyWeChatComposer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "张铭阳", + "email": "mingyoungcheung@gmail.com" + } + ], + "description": "The composer plugin for EasyWeChat", + "time": "2019-02-22T07:59:50+00:00" + }, + { + "name": "guzzlehttp/guzzle", + "version": "6.3.3", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.4", + "php": ">=5.5" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", + "psr/log": "^1.0" + }, + "suggest": { + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.3-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "time": "2018-04-22T15:46:56+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "v1.3.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "time": "2016-12-20T10:07:11+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "1.6.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "239400de7a173fe9901b9ac7c06497751f00727a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a", + "reference": "239400de7a173fe9901b9ac7c06497751f00727a", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "ext-zlib": "*", + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" + }, + "suggest": { + "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "time": "2019-07-01T23:21:34+00:00" + }, + { + "name": "monolog/monolog", + "version": "1.24.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/monolog.git", + "reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266", + "reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.0", + "psr/log": "~1.0" + }, + "provide": { + "psr/log-implementation": "1.0.0" + }, + "require-dev": { + "aws/aws-sdk-php": "^2.4.9 || ^3.0", + "doctrine/couchdb": "~1.0@dev", + "graylog2/gelf-php": "~1.0", + "jakub-onderka/php-parallel-lint": "0.9", + "php-amqplib/php-amqplib": "~2.4", + "php-console/php-console": "^3.1.3", + "phpunit/phpunit": "~4.5", + "phpunit/phpunit-mock-objects": "2.3.0", + "ruflin/elastica": ">=0.90 <3.0", + "sentry/sentry": "^0.13", + "swiftmailer/swiftmailer": "^5.3|^6.0" + }, + "suggest": { + "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", + "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-mongo": "Allow sending log messages to a MongoDB server", + "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "php-console/php-console": "Allow sending log messages to Google Chrome", + "rollbar/rollbar": "Allow sending log messages to Rollbar", + "ruflin/elastica": "Allow sending log messages to an Elastic Search server", + "sentry/sentry": "Allow sending log messages to a Sentry server" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Monolog\\": "src/Monolog" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Sends your logs to files, sockets, inboxes, databases and various web services", + "homepage": "http://github.com/Seldaek/monolog", + "keywords": [ + "log", + "logging", + "psr-3" + ], + "time": "2018-11-05T09:00:11+00:00" + }, + { + "name": "overtrue/socialite", + "version": "2.0.11", + "source": { + "type": "git", + "url": "https://github.com/overtrue/socialite.git", + "reference": "cfc513bbf5fb8c1761e8127eb9427ab05cb4ea10" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/overtrue/socialite/zipball/cfc513bbf5fb8c1761e8127eb9427ab05cb4ea10", + "reference": "cfc513bbf5fb8c1761e8127eb9427ab05cb4ea10", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "guzzlehttp/guzzle": "~5.0|~6.0", + "php": ">=7.0", + "symfony/http-foundation": "^2.7|^3.0|^4.0" + }, + "require-dev": { + "mockery/mockery": "~1.2", + "phpunit/phpunit": "~6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Overtrue\\Socialite\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "overtrue", + "email": "anzhengchao@gmail.com" + } + ], + "description": "A collection of OAuth 2 packages that extracts from laravel/socialite.", + "keywords": [ + "login", + "oauth", + "qq", + "social", + "wechat", + "weibo" + ], + "time": "2019-07-05T14:42:52+00:00" + }, + { + "name": "overtrue/wechat", + "version": "4.2.11", + "source": { + "type": "git", + "url": "https://github.com/w7corp/easywechat.git", + "reference": "853e0772e6aa53a71edf1b5d251c7ff1e6b2a2bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/w7corp/easywechat/zipball/853e0772e6aa53a71edf1b5d251c7ff1e6b2a2bf", + "reference": "853e0772e6aa53a71edf1b5d251c7ff1e6b2a2bf", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "easywechat-composer/easywechat-composer": "^1.1", + "ext-fileinfo": "*", + "ext-openssl": "*", + "ext-simplexml": "*", + "guzzlehttp/guzzle": "^6.2", + "monolog/monolog": "^1.22 || ^2.0", + "overtrue/socialite": "~2.0", + "php": ">=7.1", + "pimple/pimple": "^3.0", + "psr/simple-cache": "^1.0", + "symfony/cache": "^3.3 || ^4.3", + "symfony/event-dispatcher": "^4.3", + "symfony/http-foundation": "^2.7 || ^3.0 || ^4.0", + "symfony/psr-http-message-bridge": "^0.3 || ^1.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.15", + "mikey179/vfsstream": "^1.6", + "mockery/mockery": "^1.2.3", + "phpstan/phpstan": "^0.11.12", + "phpunit/phpunit": "^7.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "EasyWeChat\\": "src/" + }, + "files": [ + "src/Kernel/Support/Helpers.php", + "src/Kernel/Helpers.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "overtrue", + "email": "anzhengchao@gmail.com" + } + ], + "description": "微信SDK", + "keywords": [ + "sdk", + "wechat", + "weixin", + "weixin-sdk" + ], + "time": "2019-11-27T16:38:00+00:00" + }, + { + "name": "pimple/pimple", + "version": "v3.2.3", + "source": { + "type": "git", + "url": "https://github.com/silexphp/Pimple.git", + "reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/silexphp/Pimple/zipball/9e403941ef9d65d20cba7d54e29fe906db42cf32", + "reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.0", + "psr/container": "^1.0" + }, + "require-dev": { + "symfony/phpunit-bridge": "^3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2.x-dev" + } + }, + "autoload": { + "psr-0": { + "Pimple": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Pimple, a simple Dependency Injection Container", + "homepage": "http://pimple.sensiolabs.org", + "keywords": [ + "container", + "dependency injection" + ], + "time": "2018-01-21T07:42:36+00:00" + }, + { + "name": "psr/cache", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "time": "2016-08-06T20:24:11+00:00" + }, + { + "name": "psr/container", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "time": "2017-02-14T16:28:37+00:00" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2016-08-06T14:39:51+00:00" + }, + { + "name": "psr/log", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2018-11-20T15:27:04+00:00" + }, + { + "name": "psr/simple-cache", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "time": "2017-10-23T01:57:42+00:00" + }, + { + "name": "qiniu/php-sdk", + "version": "v7.2.10", + "source": { + "type": "git", + "url": "https://github.com/qiniu/php-sdk.git", + "reference": "d89987163f560ebf9dfa5bb25de9bd9b1a3b2bd8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/qiniu/php-sdk/zipball/d89987163f560ebf9dfa5bb25de9bd9b1a3b2bd8", + "reference": "d89987163f560ebf9dfa5bb25de9bd9b1a3b2bd8", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~2.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Qiniu\\": "src/Qiniu" + }, + "files": [ + "src/Qiniu/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Qiniu", + "email": "sdk@qiniu.com", + "homepage": "http://www.qiniu.com" + } + ], + "description": "Qiniu Resource (Cloud) Storage SDK for PHP", + "homepage": "http://developer.qiniu.com/", + "keywords": [ + "cloud", + "qiniu", + "sdk", + "storage" + ], + "time": "2019-10-28T10:23:23+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "time": "2019-03-08T08:55:37+00:00" + }, + { + "name": "symfony/cache", + "version": "v4.3.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/cache.git", + "reference": "1d8f7fee990c586f275cde1a9fc883d6b1e2d43e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/cache/zipball/1d8f7fee990c586f275cde1a9fc883d6b1e2d43e", + "reference": "1d8f7fee990c586f275cde1a9fc883d6b1e2d43e", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1.3", + "psr/cache": "~1.0", + "psr/log": "~1.0", + "symfony/cache-contracts": "^1.1", + "symfony/service-contracts": "^1.1", + "symfony/var-exporter": "^4.2" + }, + "conflict": { + "doctrine/dbal": "<2.5", + "symfony/dependency-injection": "<3.4", + "symfony/var-dumper": "<3.4" + }, + "provide": { + "psr/cache-implementation": "1.0", + "psr/simple-cache-implementation": "1.0", + "symfony/cache-implementation": "1.0" + }, + "require-dev": { + "cache/integration-tests": "dev-master", + "doctrine/cache": "~1.6", + "doctrine/dbal": "~2.5", + "predis/predis": "~1.1", + "psr/simple-cache": "^1.0", + "symfony/config": "~4.2", + "symfony/dependency-injection": "~3.4|~4.1", + "symfony/var-dumper": "^4.1.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Cache\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Cache component with PSR-6, PSR-16, and tags", + "homepage": "https://symfony.com", + "keywords": [ + "caching", + "psr6" + ], + "time": "2019-08-26T08:26:39+00:00" + }, + { + "name": "symfony/cache-contracts", + "version": "v1.1.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/cache-contracts.git", + "reference": "ec5524b669744b5f1dc9c66d3c2b091eb7e7f0db" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/ec5524b669744b5f1dc9c66d3c2b091eb7e7f0db", + "reference": "ec5524b669744b5f1dc9c66d3c2b091eb7e7f0db", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1.3", + "psr/cache": "^1.0" + }, + "suggest": { + "symfony/cache-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Cache\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to caching", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "time": "2019-06-13T11:15:36+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v4.3.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "429d0a1451d4c9c4abe1959b2986b88794b9b7d2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/429d0a1451d4c9c4abe1959b2986b88794b9b7d2", + "reference": "429d0a1451d4c9c4abe1959b2986b88794b9b7d2", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1.3", + "symfony/event-dispatcher-contracts": "^1.1" + }, + "conflict": { + "symfony/dependency-injection": "<3.4" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "1.1" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/expression-language": "~3.4|~4.0", + "symfony/http-foundation": "^3.4|^4.0", + "symfony/service-contracts": "^1.1", + "symfony/stopwatch": "~3.4|~4.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony EventDispatcher Component", + "homepage": "https://symfony.com", + "time": "2019-08-26T08:55:16+00:00" + }, + { + "name": "symfony/event-dispatcher-contracts", + "version": "v1.1.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "c61766f4440ca687de1084a5c00b08e167a2575c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/c61766f4440ca687de1084a5c00b08e167a2575c", + "reference": "c61766f4440ca687de1084a5c00b08e167a2575c", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1.3" + }, + "suggest": { + "psr/event-dispatcher": "", + "symfony/event-dispatcher-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\EventDispatcher\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to dispatching event", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "time": "2019-06-20T06:46:26+00:00" + }, + { + "name": "symfony/http-foundation", + "version": "v4.3.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-foundation.git", + "reference": "d804bea118ff340a12e22a79f9c7e7eb56b35adc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/d804bea118ff340a12e22a79f9c7e7eb56b35adc", + "reference": "d804bea118ff340a12e22a79f9c7e7eb56b35adc", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1.3", + "symfony/mime": "^4.3", + "symfony/polyfill-mbstring": "~1.1" + }, + "require-dev": { + "predis/predis": "~1.0", + "symfony/expression-language": "~3.4|~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpFoundation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony HttpFoundation Component", + "homepage": "https://symfony.com", + "time": "2019-08-26T08:55:16+00:00" + }, + { + "name": "symfony/mime", + "version": "v4.3.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/mime.git", + "reference": "987a05df1c6ac259b34008b932551353f4f408df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/mime/zipball/987a05df1c6ac259b34008b932551353f4f408df", + "reference": "987a05df1c6ac259b34008b932551353f4f408df", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-intl-idn": "^1.10", + "symfony/polyfill-mbstring": "^1.0" + }, + "require-dev": { + "egulias/email-validator": "^2.1.10", + "symfony/dependency-injection": "~3.4|^4.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Mime\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A library to manipulate MIME messages", + "homepage": "https://symfony.com", + "keywords": [ + "mime", + "mime-type" + ], + "time": "2019-08-22T08:16:11+00:00" + }, + { + "name": "symfony/polyfill-intl-idn", + "version": "v1.12.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-idn.git", + "reference": "6af626ae6fa37d396dc90a399c0ff08e5cfc45b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/6af626ae6fa37d396dc90a399c0ff08e5cfc45b2", + "reference": "6af626ae6fa37d396dc90a399c0ff08e5cfc45b2", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.3", + "symfony/polyfill-mbstring": "^1.3", + "symfony/polyfill-php72": "^1.9" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.12-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Idn\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Laurent Bassin", + "email": "laurent@bassin.info" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "idn", + "intl", + "polyfill", + "portable", + "shim" + ], + "time": "2019-08-06T08:03:45+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.12.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "b42a2f66e8f1b15ccf25652c3424265923eb4f17" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/b42a2f66e8f1b15ccf25652c3424265923eb4f17", + "reference": "b42a2f66e8f1b15ccf25652c3424265923eb4f17", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.12-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2019-08-06T08:03:45+00:00" + }, + { + "name": "symfony/polyfill-php72", + "version": "v1.12.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "04ce3335667451138df4307d6a9b61565560199e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/04ce3335667451138df4307d6a9b61565560199e", + "reference": "04ce3335667451138df4307d6a9b61565560199e", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.12-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2019-08-06T08:03:45+00:00" + }, + { + "name": "symfony/psr-http-message-bridge", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/psr-http-message-bridge.git", + "reference": "9ab9d71f97d5c7d35a121a7fb69f74fee95cd0ad" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/9ab9d71f97d5c7d35a121a7fb69f74fee95cd0ad", + "reference": "9ab9d71f97d5c7d35a121a7fb69f74fee95cd0ad", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1", + "psr/http-message": "^1.0", + "symfony/http-foundation": "^3.4 || ^4.0" + }, + "require-dev": { + "nyholm/psr7": "^1.1", + "symfony/phpunit-bridge": "^3.4.20 || ^4.0", + "zendframework/zend-diactoros": "^1.4.1 || ^2.0" + }, + "suggest": { + "nyholm/psr7": "For a super lightweight PSR-7/17 implementation" + }, + "type": "symfony-bridge", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Bridge\\PsrHttpMessage\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "PSR HTTP message bridge", + "homepage": "http://symfony.com", + "keywords": [ + "http", + "http-message", + "psr-17", + "psr-7" + ], + "time": "2019-03-11T18:22:33+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v1.1.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "ea7263d6b6d5f798b56a45a5b8d686725f2719a3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/ea7263d6b6d5f798b56a45a5b8d686725f2719a3", + "reference": "ea7263d6b6d5f798b56a45a5b8d686725f2719a3", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1.3", + "psr/container": "^1.0" + }, + "suggest": { + "symfony/service-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "time": "2019-08-20T14:44:19+00:00" + }, + { + "name": "symfony/var-exporter", + "version": "v4.3.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-exporter.git", + "reference": "d5b4e2d334c1d80e42876c7d489896cfd37562f2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/d5b4e2d334c1d80e42876c7d489896cfd37562f2", + "reference": "d5b4e2d334c1d80e42876c7d489896cfd37562f2", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1.3" + }, + "require-dev": { + "symfony/var-dumper": "^4.1.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\VarExporter\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A blend of var_export() + serialize() to turn any serializable data structure to plain PHP code", + "homepage": "https://symfony.com", + "keywords": [ + "clone", + "construct", + "export", + "hydrate", + "instantiate", + "serialize" + ], + "time": "2019-08-22T07:33:08+00:00" + }, + { + "name": "workerman/mysql", + "version": "v1.0.6", + "source": { + "type": "git", + "url": "https://github.com/walkor/mysql.git", + "reference": "28272aa68f9ea1a482f9bb0cf709d169f772d228" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/walkor/mysql/zipball/28272aa68f9ea1a482f9bb0cf709d169f772d228", + "reference": "28272aa68f9ea1a482f9bb0cf709d169f772d228", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-pdo": "*", + "ext-pdo_mysql": "*", + "php": ">=5.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Workerman\\MySQL\\": "./src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Long-living MySQL connection for daemon.", + "homepage": "http://www.workerman.net", + "keywords": [ + "mysql", + "pdo", + "pdo_mysql" + ], + "time": "2019-08-02T10:43:09+00:00" + }, + { + "name": "workerman/workerman", + "version": "v4.0.18", + "source": { + "type": "git", + "url": "https://github.com/walkor/Workerman.git", + "reference": "02930876526479c7e4123ef1dc8d23d509d40e72" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/walkor/Workerman/zipball/02930876526479c7e4123ef1dc8d23d509d40e72", + "reference": "02930876526479c7e4123ef1dc8d23d509d40e72", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3" + }, + "suggest": { + "ext-event": "For better performance. " + }, + "type": "library", + "autoload": { + "psr-4": { + "Workerman\\": "./" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "walkor", + "email": "walkor@workerman.net", + "homepage": "http://www.workerman.net", + "role": "Developer" + } + ], + "description": "An asynchronous event driven PHP framework for easily building fast, scalable network applications.", + "homepage": "http://www.workerman.net", + "keywords": [ + "asynchronous", + "event-loop" + ], + "time": "2021-01-02T06:14:59+00:00" + }, + { + "name": "yansongda/pay", + "version": "v2.8.5", + "source": { + "type": "git", + "url": "https://github.com/yansongda/pay.git", + "reference": "0894e0dc38468251dcae6a98c20b7279b6ab0e41" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yansongda/pay/zipball/0894e0dc38468251dcae6a98c20b7279b6ab0e41", + "reference": "0894e0dc38468251dcae6a98c20b7279b6ab0e41", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-json": "*", + "ext-libxml": "*", + "ext-openssl": "*", + "ext-simplexml": "*", + "php": ">=7.1.3", + "symfony/event-dispatcher": "^4.0", + "symfony/http-foundation": "^4.0", + "yansongda/supports": "^1.8" + }, + "require-dev": { + "mockery/mockery": "^1.2", + "phpunit/phpunit": "^7.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Yansongda\\Pay\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "yansongda", + "email": "me@yansongda.cn" + } + ], + "description": "专注 Alipay 和 WeChat 的支付扩展包", + "keywords": [ + "alipay", + "pay", + "wechat" + ], + "time": "2019-09-19T02:56:11+00:00" + }, + { + "name": "yansongda/supports", + "version": "v1.9.0", + "source": { + "type": "git", + "url": "https://github.com/yansongda/supports.git", + "reference": "830b61b0da2c6b0413a8d016903507542b322de0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yansongda/supports/zipball/830b61b0da2c6b0413a8d016903507542b322de0", + "reference": "830b61b0da2c6b0413a8d016903507542b322de0", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "guzzlehttp/guzzle": "^6.2", + "monolog/monolog": "^1.23", + "php": ">=5.5" + }, + "require-dev": { + "predis/predis": "^1.1" + }, + "suggest": { + "predis/predis": "Allows to use throttle feature" + }, + "type": "library", + "autoload": { + "psr-4": { + "Yansongda\\Supports\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "yansongda", + "email": "me@yansongda.cn" + } + ], + "description": "common components", + "keywords": [ + "Guzzle", + "array", + "collection", + "config", + "http", + "support", + "throttle" + ], + "time": "2019-06-05T05:08:48+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [], + "plugin-api-version": "1.1.0" +} diff --git a/addons/weliam_smartcity/icon.jpg b/addons/weliam_smartcity/icon.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b1156895cde5353a60acc61eb85da7d98bafa8db GIT binary patch literal 63752 zcmeEu2|QG7|M!tJMUgEknLA`jmKKRHZL(EUDntw+*^(`jFxspkWJ#h(NE*9jne4P7 zJB6|DW-Mcv?Y%~HcW=*o-_P^B@8|P=-oIu}Gvmy0u5(?#?fd=y4x^3H18vkku5}z@ zVPSzx!9R%62_1!2v9K^7%Rj7atjwP^t5>tK!PdZF%;(y59P8GuWnT+}v2S2!=U5MZ zVCy)!Hmv7lzGfbT`E};Ez+?Sd*jnZu|LlkH4&q+R`V08SA_A@AW?|)KVN^hH2x4Ia zXUja{% zdin+z49zVpFI!!)wsCfGz3zs-;eO}tJs)2`|A4UYhY^uc(T`#h5}zl%NKQ$8nU$TB zo0tEl;B8rXMP*fWP3`+HjZMuht!?cc_};$$fx)5Skx}CG%}3l zrv~;-V*Btrh|HlajqL9Y?DoGkvL6HcbzB|LdR7)Nd92(J0?NJVDPQhVO1 z2LqaEL4FRKrz3VSAav7tdT^O^#1+iy{k0|C2R(d9UG>uRTi${-1;Y&t>_a z)v{!c|GyZ~sE+hV&{xwB;v8JP3VKOd3@D@q*Tui*c6PnUx3V8TNoI=br9&sCq?Y54 zn5pxfht8<;{XhFWmxm%Q2vEurQtfbk({l6or0lA<{WRA3<*^>cAF4m2&VM8W43_P7 zfaKF%d}q{IOcMemIoSBl95Rqh2v}9B&UbnfyJUj*|C>8SexM^nK-4*RUM7U1A>P!pdy={ktOmXkbcZADM>p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GV!iLQ6?|reg<>%tL3{Q$ezeIH(kTKr9WvMh*#&oT=DB-574IR{70m$xotw#rN7HYzhhDV zE;0Hg<4Nn0{HqnecyGT67Ramnk9m9lcis#AEr0a5)$O5jG@?Dx?Q|)_Kg18x$ze|C z#?=H`al-JcYoMq6j`bG&ecIn22s2uN zhV%dNTjBa#9TnVc{D1ufTZH&XY39n4jdPY0LjH9De}Ylo3zju>5u1JSAmy)%zaQ!R zWzOu|LiXPmpzsgvoWQR~omCOtI)7grNbWOrYPUCjaO3@y{`bY-BZ&$4|L(9<@B9lv z>R_lBOVP!@ER>>Ctet)`b?W+xhu@%G5;iQo+`A;hwUx$q|4X^Tp}k;Cts|SKJ($3UCaQN6QkANF7fEXqnP1{_f9T=VTqQ^ssg+HuG4Qh`;-@=zsmo zgB%a~Z%D}z?3JC@@s+wk!Nmy8q8R z-0m3?vMaO%!M}c^uah8XcoT~DjT%V$>*p7O0v_!Jx9C`zolF-GPmI?O>Uv1qr}Gz4 zhV6H4$6Fr9)3q9V_|+Vus7RzbdmPzh^G)y2I`M>mQ44I58creQ8JFz4eh>d|aM__L literal 0 HcmV?d00001 diff --git a/addons/weliam_smartcity/install.php b/addons/weliam_smartcity/install.php new file mode 100644 index 0000000..6792de3 --- /dev/null +++ b/addons/weliam_smartcity/install.php @@ -0,0 +1,11 @@ + \ No newline at end of file diff --git a/addons/weliam_smartcity/manifest.xml b/addons/weliam_smartcity/manifest.xml new file mode 100644 index 0000000..1ae725b --- /dev/null +++ b/addons/weliam_smartcity/manifest.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/addons/weliam_smartcity/module.php b/addons/weliam_smartcity/module.php new file mode 100644 index 0000000..3fa325f --- /dev/null +++ b/addons/weliam_smartcity/module.php @@ -0,0 +1,20 @@ + $this->rule)); + if (empty($rule)) { + return false; + } + $message = $this->message; + $fansinfo = Member::wl_fans_info($message['from']); + $_W['wlmember'] = Member::wl_member_create($fansinfo, 'wechat'); + $_W['mid'] = $_W['wlmember']['id']; + $dotime = pdo_get('wlmerchant_member',array('id' => $_W['mid']),array('protime')); + $dotime = $dotime['protime']; + if(time() - 10 < $dotime){ + return false; + }else{ + pdo_update('wlmerchant_member',array('protime' => time()),array('id' => $_W['mid'])); + } + file_put_contents(PATH_DATA . "processor_qr.log", var_export($message, true) . PHP_EOL, FILE_APPEND); + + $names = explode(':', $rule['name']); + $plugin = (isset($names[1]) ? $names[1] : ''); + + if (!empty($plugin)) { + $plugin::Processor($message); + } + } +} +class Weliam_smartcity1ModuleProcessor extends WeModuleProcessor { + + public function respond() { + global $_W; + $_W['wlsetting'] = Setting::wlsetting_load(); + $rule = pdo_fetch('select * from ' . tablename('rule') . ' where id=:id limit 1', array(':id' => $this->rule)); + if (empty($rule)) { + return false; + } + $message = $this->message; + $fansinfo = Member::wl_fans_info($message['from']); + $_W['wlmember'] = Member::wl_member_create($fansinfo, 'wechat'); + $_W['mid'] = $_W['wlmember']['id']; + file_put_contents(PATH_DATA . "processor_qr.log", var_export($message, true) . PHP_EOL, FILE_APPEND); + + $names = explode(':', $rule['name']); + $plugin = (isset($names[1]) ? $names[1] : ''); + + if (!empty($plugin)) { + $plugin::Processor($message); + } + } +} \ No newline at end of file diff --git a/addons/weliam_smartcity/receiver.php b/addons/weliam_smartcity/receiver.php new file mode 100644 index 0000000..a6c3fd3 --- /dev/null +++ b/addons/weliam_smartcity/receiver.php @@ -0,0 +1,373 @@ +message; + $fansinfo = Member::wl_fans_info($message['from']); + $_W['wlmember'] = Member::wl_member_create($fansinfo, 'wechat'); + $_W['mid'] = $_W['wlmember']['id']; + $dotime = pdo_get('wlmerchant_member',array('id' => $_W['mid']),array('protime')); + $dotime = $dotime['protime']; + if(time() - 10 < $dotime){ + return false; + }else{ + pdo_update('wlmerchant_member',array('protime' => time()),array('id' => $_W['mid'])); + } + file_put_contents(PATH_DATA . "receiver_qr.log", var_export($message, true) . PHP_EOL, FILE_APPEND); + + if (!empty($message['scene'])) { + $name = pdo_getcolumn('qrcode', array('scene_str' => $message['scene'], 'uniacid' => $_W['uniacid']), 'name'); + $names = explode(':', $name); + $plugin = (isset($names[1]) ? $names[1] : ''); + if (!empty($plugin)) { + $plugin::Processor($message); + } + } else { + $scanrecord = pdo_fetch("SELECT cardid,scantime,type,url FROM " + . tablename('wlmerchant_halfcard_qrscan') + . " WHERE uniacid = {$_W['uniacid']} AND openid = '{$message['from']}' order by id desc"); + if (!empty($scanrecord) && ($scanrecord['scantime'] + 120) > time()) { + //一卡通实卡 + if (empty($scanrecord['type'])) { + $card = pdo_get('wlmerchant_halfcard_realcard', array('uniacid' => $_W['uniacid'], 'id' => $scanrecord['cardid'])); + if (!empty($card)) { + //一卡通未绑定 + if ($card['status'] == 1) { + $setting = Setting::wlsetting_read('halfcard'); + $imgurl = $setting['cardimg'] ? $setting['cardimg'] : URL_MODULE . 'plugin/halfcard/app/resource/images/cord-bg.jpg'; + $returnmess = array(array('title' => urlencode("点击立即激活此卡"), 'description' => urlencode('激活此卡'), 'picurl' => tomedia($imgurl), 'url' => app_url('halfcard/halfcard_app/realcard', array('cardsn' => $card['cardsn'], 'salt' => $card['salt'])))); + Weixinqrcode::send_news($returnmess, $message); + } + //一卡通已绑定 + if ($card['status'] == 2) { + Weixinqrcode::send_text('关注成功,请重新扫描二维码操作', $message); + } + //一卡通已禁止 + if ($card['status'] == 3) { + Weixinqrcode::send_text('抱歉,此卡已失效!', $message); + } + } + } else { + switch ($scanrecord['type']) { + case 'rush': + $rushgoods = Rush::getSingleActive($scanrecord['cardid'] , 'name,thumb'); + $title = $rushgoods['name']; + $imgurl = $rushgoods['thumb']; + $url = h5_url('pages/subPages/goods/index' , [ + 'type' => 1 , + 'id' => $scanrecord['cardid'] + ]); + $desc = '手快有,手慢无...'; + break; + case 'wlcoupon': + $wlCoupon = wlCoupon::getSingleCoupons($scanrecord['cardid'] , 'title,logo'); + $title = $wlCoupon['title']; + $imgurl = $wlCoupon['logo']; + $url = h5_url('pages/subPages/goods/index' , [ + 'type' => 5 , + 'id' => $scanrecord['cardid'] + ]); + break; + case 'wlfightgroup': + $group = Wlfightgroup::getSingleGood($scanrecord['cardid'] , 'name,logo'); + $title = $group['name']; + $imgurl = $group['logo']; + $url = h5_url('pages/subPages/goods/index' , [ + 'type' => 3 , + 'id' => $scanrecord['cardid'] + ]); + break; + case 'wlgroupdetail': + $group = pdo_get('wlmerchant_fightgroup_group' , ['id' => $scanrecord['cardid']] , ['goodsid']); + $goods = Wlfightgroup::getSingleGood($group['goodsid'] , 'name,logo'); + $title = $goods['name']; + $imgurl = $goods['logo']; + $url = h5_url('pages/subPages/group/assemble/assemble' , ['group_id' => $scanrecord['cardid']]); + break; + case 'groupon': + $groupon = pdo_get('wlmerchant_groupon_activity' , ['id' => $scanrecord['cardid']] , [ + 'name' , + 'thumb' + ]); + $title = $groupon['name']; + $imgurl = $groupon['thumb']; + $url = h5_url('pages/subPages/goods/index' , [ + 'type' => 2 , + 'id' => $scanrecord['cardid'] + ]); + break; + case 'bargain': + $groupon = pdo_get('wlmerchant_bargain_activity' , ['id' => $scanrecord['cardid']] , [ + 'name' , + 'thumb' + ]); + $title = $groupon['name']; + $imgurl = $groupon['thumb']; + $url = h5_url('pages/subPages/goods/index' , [ + 'type' => 7 , + 'id' => $scanrecord['cardid'] + ]); + break; + case 'helpBargain': + $bargainuser = pdo_get('wlmerchant_bargain_userlist' , ['id' => $scanrecord['cardid']] , ['activityid']); + $barActivity = pdo_get('wlmerchant_bargain_activity' , ['id' => $bargainuser['activityid']] , [ + 'name' , + 'thumb' + ]); + $title = $barActivity['name']; + $imgurl = $barActivity['thumb']; + $desc = '邀您一起砍!'; + $url = h5_url('pages/subPages/bargin/barginDetail/barginDetail' , ['bargin_id' => $scanrecord['cardid']]); + break; + case 'payOnline': + $title = '在线买单'; + $url = h5_url('pages/subPages2/newBuyOrder/buyOrder' , ['sid' => $scanrecord['cardid']]); + break; + case 'distribution': + $base = Setting::wlsetting_read('distribution'); + $title = $base['gztitle'] ? $base['gztitle'] : '申请分销商'; + $imgurl = tomedia($base['gzthumb']); + $desc = $base['gzdesc']; + $url = h5_url('pages/subPages/dealer/apply/apply'); + break; + case 'draw': + $activity = pdo_get('wlmerchant_draw',array('id' => $scanrecord['cardid']),array('title','share_image')); + $title = $activity['title']; + $imgurl = tomedia($activity['share_image']); + $desc = '快来参与吧'; + $url = h5_url('pages/subPages2/drawGame/drawGame',['id'=>$scanrecord['cardid']]); + break; + case 'activity': + $activity = pdo_get('wlmerchant_activitylist',array('id' => $scanrecord['cardid']),array('title','share_image','thumb')); + $title = $activity['title']; + $imgurl = !empty($activity['share_image'])? tomedia($activity['share_image']) : tomedia($activity['thumb']); + $desc = '快来报名吧'; + $url = h5_url('pages/subPages2/coursegoods/coursegoods',['id'=>$scanrecord['cardid']]); + break; + case 'housekeep': + $activity = pdo_get('wlmerchant_housekeep_service',array('id' => $scanrecord['cardid']),array('title','share_image','thumb')); + $title = $activity['title']; + $imgurl = !empty($activity['share_image'])? tomedia($activity['share_image']) : tomedia($activity['thumb']); + $desc = '快来看看吧'; + $url = h5_url('pages/subPages2/homemaking/homemakingDetails/homemakingDetails',['id'=>$scanrecord['cardid']]); + break; + case 'mobilerecharge': + $title = '点击充值'; + $desc = '欢迎使用'.$_W['wlsetting']['base']['name']; + $imgurl = $_W['wlsetting']['mobilerecharge']['share_image']; + $url = h5_url('pages/subPages2/voucherCenter/voucherCenter'); + break; + case 'integral': + $goods = pdo_get('wlmerchant_consumption_goods',array('id' => $scanrecord['cardid']),array('title','thumb')); + $title = $goods['title']; + $desc = '快来兑换吧'; + $imgurl = tomedia($goods['thumb']); + $url = h5_url('pages/subPages/goods/index' , [ + 'goodsType' => 'integral', + 'goods_id' => $scanrecord['cardid'] + ]); + break; + default: + $title = $_W['wlsetting']['base']['name']; + $desc = '欢迎使用' . $_W['wlsetting']['base']['name']; + $imgurl = $_W['wlsetting']['base']['logo']; + $url = $scanrecord['url'] ? : h5_url('pages/mainPages/index/index'); + break; + } + + //信息补充 + if(!$title) $title = $_W['wlsetting']['base']['name']; + if(!$desc) $desc = '欢迎使用'.$_W['wlsetting']['base']['name']; + if(!$imgurl) $imgurl = $_W['wlsetting']['base']['logo']; + if(!$url) $url = h5_url('pages/mainPages/index/index'); + + + $returnmess = array(array('title' => urlencode($title), 'description' => urlencode($desc), 'picurl' => tomedia($imgurl), 'url' => $url)); + Weixinqrcode::send_news($returnmess, $message); + } + } + } + } +} +class Weliam_smartcity1ModuleReceiver extends WeModuleReceiver { + + public function receive() { + global $_W; + $_W['wlsetting'] = Setting::wlsetting_load(); + $message = $this->message; + $fansinfo = Member::wl_fans_info($message['from']); + $_W['wlmember'] = Member::wl_member_create($fansinfo, 'wechat'); + $_W['mid'] = $_W['wlmember']['id']; + file_put_contents(PATH_DATA . "receiver_qr.log", var_export($message, true) . PHP_EOL, FILE_APPEND); + + if (!empty($message['scene'])) { + $name = pdo_getcolumn('qrcode', array('scene_str' => $message['scene'], 'uniacid' => $_W['uniacid']), 'name'); + $names = explode(':', $name); + $plugin = (isset($names[1]) ? $names[1] : ''); + if (!empty($plugin)) { + $plugin::Processor($message); + } + } else { + $scanrecord = pdo_fetch("SELECT cardid,scantime,type,url FROM " + . tablename('wlmerchant_halfcard_qrscan') + . " WHERE uniacid = {$_W['uniacid']} AND openid = '{$message['from']}' order by id desc"); + if (!empty($scanrecord) && ($scanrecord['scantime'] + 120) > time()) { + //一卡通实卡 + if (empty($scanrecord['type'])) { + $card = pdo_get('wlmerchant_halfcard_realcard', array('uniacid' => $_W['uniacid'], 'id' => $scanrecord['cardid'])); + if (!empty($card)) { + //一卡通未绑定 + if ($card['status'] == 1) { + $setting = Setting::wlsetting_read('halfcard'); + $imgurl = $setting['cardimg'] ? $setting['cardimg'] : URL_MODULE . 'plugin/halfcard/app/resource/images/cord-bg.jpg'; + $returnmess = array(array('title' => urlencode("点击立即激活此卡"), 'description' => urlencode('激活此卡'), 'picurl' => tomedia($imgurl), 'url' => app_url('halfcard/halfcard_app/realcard', array('cardsn' => $card['cardsn'], 'salt' => $card['salt'])))); + Weixinqrcode::send_news($returnmess, $message); + } + //一卡通已绑定 + if ($card['status'] == 2) { + Weixinqrcode::send_text('关注成功,请重新扫描二维码操作', $message); + } + //一卡通已禁止 + if ($card['status'] == 3) { + Weixinqrcode::send_text('抱歉,此卡已失效!', $message); + } + } + } else { + switch ($scanrecord['type']) { + case 'rush': + $rushgoods = Rush::getSingleActive($scanrecord['cardid'] , 'name,thumb'); + $title = $rushgoods['name']; + $imgurl = $rushgoods['thumb']; + $url = h5_url('pages/subPages/goods/index' , [ + 'type' => 1 , + 'id' => $scanrecord['cardid'] + ]); + $desc = '手快有,手慢无...'; + break; + case 'wlcoupon': + $wlCoupon = wlCoupon::getSingleCoupons($scanrecord['cardid'] , 'title,logo'); + $title = $wlCoupon['title']; + $imgurl = $wlCoupon['logo']; + $url = h5_url('pages/subPages/goods/index' , [ + 'type' => 5 , + 'id' => $scanrecord['cardid'] + ]); + break; + case 'wlfightgroup': + $group = Wlfightgroup::getSingleGood($scanrecord['cardid'] , 'name,logo'); + $title = $group['name']; + $imgurl = $group['logo']; + $url = h5_url('pages/subPages/goods/index' , [ + 'type' => 3 , + 'id' => $scanrecord['cardid'] + ]); + break; + case 'wlgroupdetail': + $group = pdo_get('wlmerchant_fightgroup_group' , ['id' => $scanrecord['cardid']] , ['goodsid']); + $goods = Wlfightgroup::getSingleGood($group['goodsid'] , 'name,logo'); + $title = $goods['name']; + $imgurl = $goods['logo']; + $url = h5_url('pages/subPages/group/assemble/assemble' , ['group_id' => $scanrecord['cardid']]); + break; + case 'groupon': + $groupon = pdo_get('wlmerchant_groupon_activity' , ['id' => $scanrecord['cardid']] , [ + 'name' , + 'thumb' + ]); + $title = $groupon['name']; + $imgurl = $groupon['thumb']; + $url = h5_url('pages/subPages/goods/index' , [ + 'type' => 2 , + 'id' => $scanrecord['cardid'] + ]); + break; + case 'bargain': + $groupon = pdo_get('wlmerchant_bargain_activity' , ['id' => $scanrecord['cardid']] , [ + 'name' , + 'thumb' + ]); + $title = $groupon['name']; + $imgurl = $groupon['thumb']; + $url = h5_url('pages/subPages/goods/index' , [ + 'type' => 7 , + 'id' => $scanrecord['cardid'] + ]); + break; + case 'helpBargain': + $bargainuser = pdo_get('wlmerchant_bargain_userlist' , ['id' => $scanrecord['cardid']] , ['activityid']); + $barActivity = pdo_get('wlmerchant_bargain_activity' , ['id' => $bargainuser['activityid']] , [ + 'name' , + 'thumb' + ]); + $title = $barActivity['name']; + $imgurl = $barActivity['thumb']; + $desc = '邀您一起砍!'; + $url = h5_url('pages/subPages/bargin/barginDetail/barginDetail' , ['bargin_id' => $scanrecord['cardid']]); + break; + case 'payOnline': + $title = '在线买单'; + $url = h5_url('pages/subPages2/newBuyOrder/buyOrder' , ['sid' => $scanrecord['cardid']]); + break; + case 'distribution': + $base = Setting::wlsetting_read('distribution'); + $title = $base['gztitle'] ? $base['gztitle'] : '申请分销商'; + $imgurl = tomedia($base['gzthumb']); + $desc = $base['gzdesc']; + $url = h5_url('pages/subPages/dealer/apply/apply'); + break; + case 'draw': + $activity = pdo_get('wlmerchant_draw',array('id' => $scanrecord['cardid']),array('title','share_image')); + $title = $activity['title']; + $imgurl = tomedia($activity['share_image']); + $desc = '快来参与吧'; + $url = h5_url('pages/subPages2/drawGame/drawGame',['id'=>$scanrecord['cardid']]); + break; + case 'activity': + $activity = pdo_get('wlmerchant_activitylist',array('id' => $scanrecord['cardid']),array('title','share_image','thumb')); + $title = $activity['title']; + $imgurl = !empty($activity['share_image'])? tomedia($activity['share_image']) : tomedia($activity['thumb']); + $desc = '快来报名吧'; + $url = h5_url('pages/subPages2/coursegoods/coursegoods',['id'=>$scanrecord['cardid']]); + break; + case 'housekeep': + $activity = pdo_get('wlmerchant_housekeep_service',array('id' => $scanrecord['cardid']),array('title','share_image','thumb')); + $title = $activity['title']; + $imgurl = !empty($activity['share_image'])? tomedia($activity['share_image']) : tomedia($activity['thumb']); + $desc = '快来看看吧'; + $url = h5_url('pages/subPages2/homemaking/homemakingDetails/homemakingDetails',['id'=>$scanrecord['cardid']]); + break; + case 'mobilerecharge': + $title = '点击充值'; + $desc = '欢迎使用'.$_W['wlsetting']['base']['name']; + $imgurl = $_W['wlsetting']['mobilerecharge']['share_image']; + $url = h5_url('pages/subPages2/voucherCenter/voucherCenter'); + break; + default: + $title = $_W['wlsetting']['base']['name']; + $desc = '欢迎使用' . $_W['wlsetting']['base']['name']; + $imgurl = $_W['wlsetting']['base']['logo']; + $url = $scanrecord['url'] ? : h5_url('pages/mainPages/index/index'); + break; + } + + //信息补充 + if(!$title) $title = $_W['wlsetting']['base']['name']; + if(!$desc) $desc = '欢迎使用'.$_W['wlsetting']['base']['name']; + if(!$imgurl) $imgurl = $_W['wlsetting']['base']['logo']; + if(!$url) $url = h5_url('pages/mainPages/index/index'); + + + $returnmess = array(array('title' => urlencode($title), 'description' => urlencode($desc), 'picurl' => tomedia($imgurl), 'url' => $url)); + Weixinqrcode::send_news($returnmess, $message); + } + } + } + } +} \ No newline at end of file diff --git a/addons/weliam_smartcity/site.php b/addons/weliam_smartcity/site.php new file mode 100644 index 0000000..e4cbb20 --- /dev/null +++ b/addons/weliam_smartcity/site.php @@ -0,0 +1,174 @@ + intval(mc_openid2uid($auth_userinfo['openid'])), + 'openid' => $auth_userinfo['openid'], + 'nickname' => $auth_userinfo['nickname'], + 'unionid' => $auth_userinfo['unionid'], + 'avatar' => $auth_userinfo['headimgurl'] + ); + $member = Member::wl_member_create($userinfo, 'wechat'); + $backurl = h5_url(urldecode($_GPC['vueurl'])); + $token = pdo_getcolumn(PDO_NAME.'login',array('token'=>$member['tokey'],'refresh_time >' => time()),'secret_key'); + if(empty($token)) { + $res = Login::generateToken($member['tokey'], 'login'); + $token = $res['message']; + } + wl_setcookie('user_token',$token,86400); + $url = $backurl ? $backurl: h5_url('pages/subPages/userCenter'); + + echo ""; + exit; + } + + /** + * Comment: 通过分享链接进入平台时对链接的处理和跳转 + * Author: zzw + * Date: 2019/9/23 15:23 + */ + public function doMobileReturnRequest() { + global $_W, $_GPC; + $link = $_GPC['link'] ?: h5_url('pages/mainPages/index/index'); + //链接转换操作 + $list = Links::getTransformationLink(); + foreach($list as $linkKey => $linkVal){ + $link = str_replace($linkKey,$linkVal,$link); + } + #1、判断link是否存在token信息,存在则删除 + $http = explode('?#', $link); + $linkArr = explode('?', $http[1]); + $paramsStr = $linkArr[1]; + $position = strpos($paramsStr, '&token=');//开始位置 + if ($position > 0) $linkArr[1] = substr($paramsStr, 0, $position) + . substr($paramsStr, 39 + strlen(substr($paramsStr, 0, $position)), strlen($paramsStr)); + $link = $http[0] . '?#' . $linkArr[0] . '?' . $linkArr[1]; + #2、规避head_id=undefined的参数 + $link = str_replace('&head_id=undefined', '', $link); + #3、跳转至分享链接 + + header('Location:' . $link); + } + + +} + +class Weliam_smartcity1ModuleSite extends WeModuleSite { + + public function __call($name, $arguments) { + global $_W, $_GPC; + $isWeb = stripos($name, 'doWeb') === 0; + $isMobile = stripos($name, 'doMobile') === 0; + $_W['catalog'] = $catalog = !empty($isWeb) ? 'sys' : 'app'; + $_W['plugin'] = $plugin = !empty($_GPC['p']) ? $_GPC['p'] : 'dashboard'; + $_W['controller'] = $controller = !empty($_GPC['ac']) ? $_GPC['ac'] : 'dashboard'; + $_W['method'] = $method = !empty($_GPC['do']) ? $_GPC['do'] : 'index'; + $_W['wlsetting'] = Setting::wlsetting_load(); + $_W['wlsetting']['trade']['credittext'] = $_W['wlsetting']['trade']['credittext'] ? $_W['wlsetting']['trade']['credittext'] : '积分'; + $_W['wlsetting']['trade']['moneytext'] = $_W['wlsetting']['trade']['moneytext'] ? $_W['wlsetting']['trade']['moneytext'] : '余额'; + if (!in_array($_W['method'], array('qrcodeimg', 'Notify', 'captcha')) && !in_array($_W['controller'], array('wxapp')) && $_GPC['r'] != 'api') { + Func_loader::$catalog('cover'); + } + if ($isWeb || $isMobile) { + wl_new_method($plugin, $controller, $method, $_W['catalog']); + } + trigger_error("访问的模块 {$plugin} 不存在.", E_USER_WARNING); + return null; + } + + /** + * Comment: 微信自动登录 + */ + public function doMobileWechatsign() { + global $_W, $_GPC; + $auth_userinfo = mc_oauth_userinfo(); + if (empty($auth_userinfo['openid'])) { + die('授权信息获取失败,请退出重试'); + } + $userinfo = array( + 'uid' => intval(mc_openid2uid($auth_userinfo['openid'])), + 'openid' => $auth_userinfo['openid'], + 'nickname' => $auth_userinfo['nickname'], + 'unionid' => $auth_userinfo['unionid'], + 'avatar' => $auth_userinfo['headimgurl'] + ); + $member = Member::wl_member_create($userinfo, 'wechat'); + $backurl = h5_url(urldecode($_GPC['vueurl'])); + $token = pdo_getcolumn(PDO_NAME.'login',array('token'=>$member['tokey'],'refresh_time >' => time()),'secret_key'); + if(empty($token)) { + $res = Login::generateToken($member['tokey'], 'login'); + $token = $res['message']; + } + wl_setcookie('user_token',$token,86400); + $url = $backurl ? $backurl: h5_url('pages/subPages/userCenter'); + + echo ""; + exit; + } + + /** + * Comment: 通过分享链接进入平台时对链接的处理和跳转 + * Author: zzw + * Date: 2019/9/23 15:23 + */ + public function doMobileReturnRequest() { + global $_W, $_GPC; + $link = $_GPC['link'] ?: h5_url('pages/mainPages/index/index'); + //链接转换操作 + $list = Links::getTransformationLink(); + foreach($list as $linkKey => $linkVal){ + $link = str_replace($linkKey,$linkVal,$link); + } + #1、判断link是否存在token信息,存在则删除 + $http = explode('?#', $link); + $linkArr = explode('?', $http[1]); + $paramsStr = $linkArr[1]; + $position = strpos($paramsStr, '&token=');//开始位置 + if ($position > 0) $linkArr[1] = substr($paramsStr, 0, $position) + . substr($paramsStr, 39 + strlen(substr($paramsStr, 0, $position)), strlen($paramsStr)); + $link = $http[0] . '?#' . $linkArr[0] . '?' . $linkArr[1]; + #2、规避head_id=undefined的参数 + $link = str_replace('&head_id=undefined', '', $link); + #3、跳转至分享链接 + + header('Location:' . $link); + } + + +} \ No newline at end of file diff --git a/addons/weliam_smartcity/uniapp.php b/addons/weliam_smartcity/uniapp.php new file mode 100644 index 0000000..3677778 --- /dev/null +++ b/addons/weliam_smartcity/uniapp.php @@ -0,0 +1,3201 @@ +reLogin(); + } + //判断方法是否存在 存在进行正常请求 + $method = 'doPage' . ucfirst($method); + if (method_exists($this , $method)) $this->$method(); + else $this->renderError('错误的请求 - '.$method.' Method does not exist! '); + } + + /******** 公共接口 ************************************************************************************************/ + /** + * Comment: 获取当前平台的信息(公共) + * Author: zzw + * Date: 2019/7/9 11:09 + */ + public function doPageGetPlatformInfor() + { + global $_W , $_GPC; + $type = $_GPC['type'];//1=平台基本信息;2=热门搜索信息 + if($type != 2){ + $type = 1; + } + switch ($type) { + case 1: + $set = Setting::wlsetting_read("base"); + $info['name'] = $set['name']; + $info['logo'] = tomedia($set['logo']); + $info['phone'] = $set['phone']; + $info['loading'] = $set['loading'] ? tomedia($set['loading']) : ''; + $info['videoimg'] = $set['videoimg'] ? tomedia($set['videoimg']) : ''; + $info['languageStatus'] = $set['languageStatus'] ? : 0; + $title = '本平台基本信息'; + //获取代理商设置 - 无代理商时显示的图片 + $settings = Setting::wlsetting_read('areaset'); + $info['agent_iamge'] = tomedia($settings['show_img']); + //是否有名片 + if(p('citycard')){ + $info['citycardflag'] = 1; + }else{ + $info['citycardflag'] = 0; + } + break;//本平台基本信息 + case 2: + $set = Setting::wlsetting_read("base"); + if (strlen($set['shout']) > 1) { + $data = explode(',',$set['shout']); + } + $info['data'] = $data; + $info['serbgw'] = $set['serbgw'] ? : '#FFD93F'; + $info['serbgn'] = $set['serbgn'] ? : '#FFF4C4'; + $title = '热门搜索信息'; + break;//热门搜索信息 + } + if($type != 2){ + $memberset = Setting::wlsetting_read("userset"); + $info['verifycode'] = $memberset['verifycode']; + $info['smsver'] = $memberset['smsver']; + //炮灰域名跳转 + $domain = Cloud::wl_syssetting_read('jumpadmin'); + $info['targetDmain'] = []; + if(!empty($domain['targetDmain'])){ + foreach($domain['targetDmain'] as $ain){ + if(!empty($ain)){ + $info['targetDmain'][] = $ain; + } + } + } + $info['endDmain'] = $domain['endDmain']; + if(Customized::init('customized336')){ + $info['newpayonline'] = 1; + } + //家政入驻类型 + $houseset = Setting::agentsetting_read('housekeep'); + $info['houseinfo'] = $houseset['intostatus'] ? : 0; + + + } + + + $this->renderSuccess($title , $info); + } + /** + * Comment: 文件上传 + * Author: zzw + * Date: 2019/7/23 9:32 + */ + public function doPageUploadFiles(){ + global $_W , $_GPC; + #1、判断上传方式 + $uploadType = $_GPC['upload_type'] ? $_GPC['upload_type'] : 1;//1=普通上传;2=微信端上传 + #2、调用方法进行处理 + UploadFile::uploadIndex($_FILES ,$uploadType, $_GPC['id']); + } + /** + * Comment: 学生认证文件上传 + * Author: zzw + * Date: 2019/7/23 9:32 + */ + public function doPageStudentUploadFiles(){ + global $_W , $_GPC; + #1、判断上传方式 + $uploadType = $_GPC['upload_type'] ? $_GPC['upload_type'] : 1;//1=普通上传;2=微信端上传 + #2、调用方法进行处理 + UploadFile::uploadIndex($_FILES ,$uploadType, $_GPC['id'], [], 'student_info'); + } + /** + * Comment: 搜索内容 + * Author: zzw + * Date: 2019/12/25 11:58 + */ + public function doPageSearch() + { + global $_W , $_GPC; + #1、参数信息获取 + $type = $_GPC['type'] ? : 1;//搜索类型 1=商品,2=商户,3=头条 + $page = $_GPC['page'] ? : 1; + $pageIndex = $_GPC['page_index'] ? : 10; + $pageStart = $page * $pageIndex - $pageIndex; + $search = strlen($_GPC['search']) > 0 ? $_GPC['search'] : $this->renderError('请输入搜索内容!'); + $lng = $_GPC['lng'] ? : 0;//104.0091133118 经度 + $lat = $_GPC['lat'] ? : 0;//30.5681964123 纬度 + #1、根据type进行对应类型的搜索 + $where = " WHERE uniacid = {$_W['uniacid']} AND aid = {$_W['aid']} ";//基本条件生成 + switch ($type) { + case 1: + $title = '商品'; + #商品搜索规则:销售中商品、当前公众号,当前代理商,名称匹配 + //条件生成 + $where .= " AND status = 2 AND (`name` LIKE '%{$search}%' OR price LIKE '%{$search}%') "; + //sql语句生成 商品类型:1=抢购 2=团购 3=拼团 4=大礼包 5=优惠券 6=折扣卡 7=砍价商品 8=积分商品 + $sql = "SELECT id,'1' as type,sort FROM " . tablename(PDO_NAME . "rush_activity") + . $where . " UNION ALL SELECT id,'2' as type,sort FROM " + . tablename(PDO_NAME . "groupon_activity") + . $where . " UNION ALL SELECT id,'3' as type,listorder as sort FROM " + . tablename(PDO_NAME . "fightgroup_goods") + . $where . " UNION ALL SELECT id,'5' as type,indexorder as sort FROM " + . tablename(PDO_NAME . "couponlist") + . $where . " AND is_show = 0 UNION ALL SELECT id,'7' as type,sort FROM " + . tablename(PDO_NAME . "bargain_activity") + . $where; + //总数获取 + $totalSql = str_replace('id,' , 'count(*) as total,' , $sql); + $totalList = pdo_fetchall($totalSql); + $total = array_sum(array_column($totalList , 'total')); + //列表获取 + $list = pdo_fetchall($sql . " ORDER BY sort DESC LIMIT {$pageStart},{$pageIndex} "); + foreach ($list as &$val) { + $info = WeliamWeChat::getHomeGoods($val['type'] , $val['id']); + $info['goods_type'] = $info['plugin']; + //删除多余信息 + unset($info['optionstatus']); + unset($info['appointment']); + unset($info['allowapplyre']); + unset($info['communityid']); + unset($info['address']); + unset($info['plugin']); + unset($info['user_list']); + unset($info['user_num']); + unset($info['pay_state']); + unset($info['is_vip']); + unset($info['discount_price']); + unset($info['spec']); + //数据处理 + switch ($info['type']) { + case 1: + $info['url'] = h5_url('pages/subPages/goods/index' , ['id' => $val['id'] , 'type' => 1]); + break;//抢购商品 + case 2: + $info['url'] = h5_url('pages/subPages/goods/index' , ['id' => $val['id'] , 'type' => 2]); + break;//团购商品 + case 3: + $info['url'] = h5_url('pages/subPages/goods/index' , ['id' => $val['id'] , 'type' => 3]); + break;//拼团商品 + case 4: + $info['url'] = h5_url('pages/mainPages/memberCard/memberCard' , [ + 'id' => $val['id'] , + 'type' => 4 + ]); + break;//大礼包 + case 5: + $info['url'] = h5_url('pages/subPages/goods/index' , ['id' => $val['id'] , 'type' => 5]); + break;//优惠券 + case 6: + $info['url'] = h5_url('pages/mainPages/memberCard/memberCard' , [ + 'id' => $val['id'] , + 'type' => 6 + ]); + break;//折扣卡 + case 7: + $info['url'] = h5_url('pages/subPages/goods/index' , ['id' => $val['id'] , 'type' => 7]); + break;//砍价商品 + } + $val['info'] = $info; + $val['goods_type'] = $info['goods_type']; + if ($val['goods_type'] == 'wlfightgroup') $val['goods_type'] = 'fight'; + //获取商品详情链接 1=抢购 2=团购 3=拼团 4=大礼包 5=优惠券 6=折扣卡 7=砍价商品 + unset($val['id']); + unset($val['sort']); + unset($val['type']); + } + break;//商品 + case 2: + $title = '商户'; + //条件生成 + $where .= " AND status = 2 AND enabled = 1 AND ( storename LIKE '%{$search}%' OR `describe` LIKE '%{$search}%') "; + //sql语句生成 + $sql = "SELECT * FROM " . tablename(PDO_NAME . "merchantdata") . $where; + //总数获取 + $totalSql = str_replace('*' , 'count(*)' , $sql); + $total = pdo_fetchcolumn($totalSql); + //列表获取 + $field = "id,storename,logo,address,storehours,location,pv,score,panorama,videourl,tag"; + $sql = str_replace('*' , $field , $sql); + $list = pdo_fetchall($sql . " ORDER BY listorder DESC LIMIT {$pageStart},{$pageIndex} "); + foreach ($list as $key => &$val) { + //获取店铺分类信息 + $val['panorama'] = !empty($val['panorama']) ? 1 : 0; + $val['videourl'] = !empty($val['videourl']) ? 1 : 0; + //店铺标签 + $val['tags'] = []; + $tagids = unserialize($val['tag']); + if (!empty($tagids)) { + $tags = pdo_getall('wlmerchant_tags' , ['id' => $tagids] , ['title']); + $val['tags'] = $tags ? array_column($tags , 'title') : []; + } + unset($val['tag']); + //获取店铺信息地址跳转链接 + $url = h5_url('pages/mainPages/store/index' , ['sid' => $val['id']]); + $val['jump_link'] = $url; + //处理图片信息 + $val['logo'] = tomedia($val['logo']); + //处理营业时间 + $storehours = unserialize($val['storehours']); + if(!empty($storehours['startTime'])){ + $val['storehours'] = $storehours['startTime'] . ' - ' . $storehours['endTime']; + }else{ + $val['storehours'] = ''; + foreach($storehours as $hk => $hour){ + if($hk > 0){ + $val['storehours'] .= ','.$hour['startTime'] . ' - ' . $hour['endTime']; + }else{ + $val['storehours'] .= $hour['startTime'] . ' - ' . $hour['endTime']; + } + } + } + + //处理店铺距离 + $location = unserialize($val['location']); + $val['length'] = Store::getdistance($location['lng'] , $location['lat'] , $lng , $lat); + if ((!empty($val['length']) || is_numeric($val['length'])) && $lng && $lat) { + if ($val['length'] > 9999998) { + $val['distance'] = " "; + } + else if ($val['length'] > 1000) { + $val['distance'] = (floor(($val['length'] / 1000) * 10) / 10) . "km"; + } + else { + $val['distance'] = intval($val['length']) . "m"; + } + } + unset($val['location']); + } + //获取店铺商品活动信息 + $list = WeliamWeChat::getStoreList($list); + break;//商户 + case 3: + $title = '头条'; + //条件生成 + $where .= " AND title LIKE '%{$search}%' "; + //sql语句生成 + $sql = " SELECT * FROM " . tablename(PDO_NAME . "headline_content") . $where; + //总数获取 + $totalSql = str_replace('*' , 'count(*)' , $sql); + $total = pdo_fetchcolumn($totalSql); + //列表获取 + $sql = str_replace('*' , 'id,display_img,title,browse' , $sql); + $list = pdo_fetchall($sql . " ORDER BY release_time DESC LIMIT {$pageStart},{$pageIndex}"); + foreach ($list as $k => &$v) { + $v['display_img'] = tomedia($v['display_img']); + $v['jump_link'] = h5_url('pages/mainPages/headline/headlineDetail' , ['headline_id' => $v['id']]);//头条详情链接 + } + break;//头条 + } + #1、信息拼装 + $data = [ + 'is_pocket' => 0 , + 'is_headline' => 0 , + 'total' => ceil($total / $pageIndex) , + 'list' => $list + ]; + #1、判断是否存在头条插件 0=不存在,1=存在 + if (p('headline')) { + $data['is_headline'] = 1; + } + //是否存在帖子 + $pocketset = Setting::agentsetting_read('pocket'); + if($pocketset['status'] > 0){ + $data['is_pocket'] = 1; + } + + $this->renderSuccess($title . '列表' , $data); + } + /** + * Comment: 获取图片验证码 + * Author: zzw + * Date: 2019/8/8 9:09 + */ + public function doPageGVC() + { + global $_W , $_GPC; + load()->classs("captcha"); + error_reporting(0); + session_start(); + $captcha = new Captcha(); + $captcha->build(108 , 44); + $hash = md5(strtolower($captcha->phrase) . $_W["config"]["setting"]["authkey"]); + isetcookie("__code" , $hash); + $_SESSION["__code"] = $hash; + $time = time(); + $code = $captcha->phrase; + pdo_insert(PDO_NAME . 'gvccode', ['createtime' => $time,'code' => $code]); + ob_start(); + imagepng($captcha->image); + $image_data = base64_encode(ob_get_contents()); + ob_end_clean(); + $image_data = "data:image/png;base64," . $image_data; + $this->renderSuccess('图形验证码信息' , ['image_data' => $image_data , 'time' => $time]); + } + /** + * Comment: 发送短信验证码 + * Author: zzw + * Date: 2019/8/8 9:37 + */ + public function doPagePIN() + { + global $_W , $_GPC; + #1、参数获取 + $type = $_GPC['type'] ? $_GPC['type'] : 1;//1=注册 2=登录 3修改支付密码 + $phone = $_GPC['phone'];//手机号码 + $mid = $_W['mid']; + $is_verifycode = $_GPC['is_verifycode']?:0; + if (!$phone) $this->renderError('请输入手机号码'); + if ($_W['wlsetting']['userset']['verifycode']>0 && $is_verifycode <= 0) { + $time = $_GPC['time']; + $code = trim($_GPC['code']); + if(empty($code)){ + $this->renderError('请输入图形验证码'); + } + $truecode = pdo_getcolumn(PDO_NAME.'gvccode',array('createtime'=>$time),'code'); + if($code != $truecode){ + $this->renderError('图形验证码错误'); + } + pdo_delete('wlmerchant_gvccode',array( 'createtime <'=> $time - 86400)); + } + #2、分钟级流控 每分钟每个手机号只能发送一次 + $time = igetcookie("phone_" . $phone); + $intervalTime = 65;//记录手机号信息 偏移5秒钟,用于兼容接口请求时间 + if ($time) { + $surplusSecond = time() - $time; + if ($surplusSecond > 0) { + $surplusTime = $intervalTime - $surplusSecond; + $this->renderError('发送过于频繁,请在' . $surplusTime . '秒后进行发送'); + } + } + isetcookie("phone_" . $phone , time() , $intervalTime); + #3、判断当前手机是否已经绑定 + $where['mobile'] = $phone; + $where['uniacid'] = $_W['uniacid']; + if ($mid > -1) $where['id !='] = $mid; + $have = pdo_get(PDO_NAME . "member" , $where); + if ($have && $type == 1) $this->renderError('该手机已被绑定'); + #4、验证码发送 + $code = rand(1000 , 9999); + $res = WeliamWeChat::smsSF($code , $phone,$mid); + if ($res['result'] == 1) { + pdo_delete('wlmerchant_pincode',array('mobile'=>$phone)); + pdo_insert(PDO_NAME.'pincode', array('mobile'=>$phone,'code'=>$code,'time'=>time())); + $this->renderSuccess('发送成功' , ['code' => 0]); + } + else { + $this->renderError('验证码发送失败:' . $res['msg']); + } + } + /** + * Comment: 获取地区列表 + * Author: wlf + * Date: 2019/8/12 14:12 + */ + public function doPageCityInfo() + { + global $_W; + $citylist = pdo_getall('wlmerchant_area' , ['level' => 1,'visible' => 2] , ['id' , 'name']); + foreach ($citylist as $key => &$prov) { + $prov['area'] = pdo_getall('wlmerchant_area' , ['level' => 2 , 'pid' => $prov['id'],'visible' => 2] , ['id' , 'name']); + foreach ($prov['area'] as $k => &$area) { + $area['dist'] = pdo_getall('wlmerchant_area' , ['level' => 3 , 'pid' => $area['id'],'visible' => 2] , ['id' , 'name']); + } + } + $this->renderSuccess('地区数据' , $citylist); + } + /** + * Comment: 生成(获取)海报信息 + * Author: zzw + * Date: 2019/8/14 18:30 + */ + public function doPagePoster() + { + global $_W , $_GPC; + #1、参数获取 + //1=分销邀请购买、2=分销邀请下级、3=抢购、4=团购、5=卡券、6=拼团、7=砍价、8=店铺、9=业务员商家入驻、10=积分商品海报、11=个人名片海报 14=同城活动 + $type = trim($_GPC['type']) OR $this->renderError('请明确海报类型'); + $id = intval($_GPC['id']);//商户/商品的id + $bgImg = trim($_GPC['bg_img']); + $source = $_GPC['source'] ? : 1;//渠道:1=公众号(默认);2=h5;3=小程序 + $goodsType = $_GPC['goods_type'] ? : 1;//商品类型:1=抢购 2=团购 3=拼团 4=大礼包 5=优惠券 6=折扣卡 7=砍价商品 8=积分商品 + #2、获取自定义海报设置信息 + if (p('diyposter')) { + $ids = [ + 1 => $_W['wlsetting']['diyposter']['distpid'] ,//分销自定义海报id + 2 => $_W['wlsetting']['diyposter']['distpid'] ,//分销自定义海报id + 3 => $_W['wlsetting']['diyposter']['rushpid'] ,//抢购自定义海报id + 4 => $_W['wlsetting']['diyposter']['grouponpid'] ,//团购自定义海报id + 5 => $_W['wlsetting']['diyposter']['cardpid'] ,//卡券自定义海报id + 6 => $_W['wlsetting']['diyposter']['fgrouppid'] ,//拼团自定义海报id + 7 => $_W['wlsetting']['diyposter']['bargainid'] ,//砍价自定义海报id + 8 => $_W['wlsetting']['diyposter']['storepid'] ,//商户自定义海报id + 9 => $_W['wlsetting']['diyposter']['storepid'] ,//业务员自定义海报id + 10 => $_W['wlsetting']['diyposter']['consumption_id'] ,//积分商品自定义海报id + 11 => $_W['wlsetting']['diyposter']['user_card_id'] ,//个人名片自定义海报id + 12 => $_W['wlsetting']['diyposter']['yellow_id'] ,//黄页自定义海报id + 14 => $_W['wlsetting']['diyposter']['activityid'] ,//活动自定义海报id + 16 => $_W['wlsetting']['diyposter']['housekeepid'], //家政服务服务项目海报id + ]; + if (is_array($ids) && $ids[$type] > 0) { + $diyInfo = pdo_get(PDO_NAME . 'poster' , ['uniacid' => $_W['uniacid'] , 'id' => $ids[$type]] , [ + 'bg' , + 'otherbg' + ]); + $bgList = iunserializer($diyInfo['otherbg']); + if (is_array($bgList) && count($bgList) > 0) { + foreach ($bgList as $key => &$val) { + $val = tomedia($val); + } + } + } + } + #3、获取海报信息 1=分销邀请购买、2=分销邀请下级、3=抢购、4=团购、5=卡券、6=拼团、7=砍价、8=店铺、9=业务员商家入驻、10=积分商品海报 + $useagent = 'wechat'; + switch ($type) { + case 1: + $poster = Poster::createDistriPoster($id , $source , $bgImg , $goodsType); + break;//分销邀请购买 + case 2: + $poster = Poster::createInvitevipPoster($_W['mid'] , $source , $bgImg); + break;//分销邀请下级 + case 3: + $poster = Poster::createRushPoster($id , $source , $bgImg); + break;//抢购 + case 4: + $poster = Poster::createGrouponPoster($id , $source , $bgImg); + break;//团购 + case 5: + $poster = Poster::createCouponPoster($id , $source , $bgImg); + break;//卡券 + case 6: + $poster = Poster::createFightgroupPoster($id , $source , $bgImg); + break;//拼团 + case 7: + $poster = Poster::createBargainPoster($id , $source , $bgImg); + break;//砍价 + case 8: + $poster = Poster::createStorePoster($id , $source , $bgImg); + break;//店铺 + case 9: + $poster = Poster::createSalesmanPoster($_W['mid'] , 0 , $useagent , $bgImg); + break;//业务员 + case 10: + $poster = Poster::createConsumptionPoster($id , $source , $bgImg); + break;//积分商品海报 + case 11: + $poster = Poster::createUserCardPoster($id , $source , $bgImg); + break;//个人名片海报 + case 12: + $poster = Poster::createYellowPoster($id , $source , $bgImg); + break;//商户114海报 + case 13: + $poster = Poster::createDrawPoster($id , $source ); + break;//抽奖海报生成 + case 14: + $poster = Poster::createActivityPoster($id , $source , $bgImg); + break;//活动 + case 15: + $poster = Poster::createDatingPoster($id , $source , $bgImg); + break;//相亲交友 - 红娘邀请函 + case 16: + $poster = Poster::createHousekeepPoster($id , $source , $bgImg); + break;//家政服务项目海报 + } + #4、数据拼装 + $data['url'] = $poster . "?v=" . time(); + $data['bg_list'] = is_array($bgList) ? $bgList : []; + $this->renderSuccess('海报信息' , $data); + } + /** + * Comment: 推荐商品获取 + * Author: zzw + * Date: 2019/8/15 9:09 + */ + public function doPageGetRecommendGoods() + { + global $_W , $_GPC; + if(!empty($_W['wlsetting']['base']['recommendGoods'])) $this->renderSuccess('推荐商品获取' , []); + #1、参数获取 + $num = $_GPC['num'] ? $_GPC['num'] : 4;//获取的商品数量 + $type = $_GPC['type'] ? $_GPC['type'] : 0;//当前商品类型 1=抢购,2=团购,3=拼团, 5=优惠券,7=砍价 + $id = $_GPC['id'] ? $_GPC['id'] : 0;//当前商品的id + #2、商品列表获取 + $list = WeliamWeChat::getRecommendGoods($num , $type , $id); + $this->renderSuccess('推荐商品获取' , $list); + } + /** + * Comment: 商品购买弹幕获取 + * Author: zzw + * Date: 2019/8/16 14:00 + */ + public function doPagePayBarrageList() + { + global $_W , $_GPC; + #1、参数获取 + $type = $_GPC['type'];//商品类型:1=抢购 2=团购 3=拼团 4=一卡通开卡弹幕 5=优惠券 6=折扣卡 7=砍价商品 8=积分商品 + $id = $_GPC['id'];//商品id + if($_W['wlsetting']['base']['goodBarrage'] > 0 ){ + $list = []; + }else{ + if (!$type) $this->renderError('错误的商品类型!'); + #2、根据商品类型配置查询参数信息 + $by = " GROUP BY a.mid ORDER BY a.createtime DESC LIMIT 10 "; + switch ($type) { + case 1: + $list = pdo_fetchall("SELECT b.nickname,b.avatar,b.encodename FROM " . tablename(PDO_NAME . "rush_order") + . " as a RIGHT JOIN " . tablename(PDO_NAME . "member") + . " as b ON a.mid = b.id WHERE a.activityid = {$id} AND a.status !=0 AND a.status !=5 AND a.uniacid = {$_W['uniacid']} " . $by); + break;//抢购商品 + case 2: + $list = pdo_fetchall("SELECT b.nickname,b.avatar,b.encodename FROM " . tablename(PDO_NAME . "order") + . " as a RIGHT JOIN " . tablename(PDO_NAME . "member") + . " as b ON a.mid = b.id WHERE a.fkid = {$id} AND a.status !=0 AND a.status !=5 AND plugin = 'groupon' AND a.uniacid = {$_W['uniacid']} " . $by); + break;//团购商品 + case 3: + $list = pdo_fetchall("SELECT b.nickname,b.avatar,b.encodename FROM " . tablename(PDO_NAME . "order") + . " as a RIGHT JOIN " . tablename(PDO_NAME . "member") + . " as b ON a.mid = b.id WHERE a.fkid = {$id} AND a.status !=0 AND a.status !=5 AND plugin = 'wlfightgroup' AND a.uniacid = {$_W['uniacid']} " . $by); + break;//拼团商品 + case 4: + $list = pdo_fetchall("SELECT b.nickname,b.avatar,b.encodename,a.createtime,a.expiretime FROM " + . tablename(PDO_NAME . "halfcardmember") . " as a RIGHT JOIN " + . tablename(PDO_NAME . "member") . " as b ON a.mid = b.id WHERE a.uniacid = {$_W['uniacid']} " . $by); + break;//一卡通开卡弹幕 + case 5: + $list = pdo_fetchall("SELECT b.nickname,b.avatar,b.encodename FROM " . tablename(PDO_NAME . "order") + . " as a RIGHT JOIN " . tablename(PDO_NAME . "member") + . " as b ON a.mid = b.id WHERE a.fkid = {$id} AND a.status !=0 AND a.status !=5 AND plugin = 'coupon' AND a.uniacid = {$_W['uniacid']} " . $by); + break;//优惠券 + case 6: + $list = pdo_fetchall("SELECT b.nickname,b.avatar,b.encodename FROM " . tablename(PDO_NAME . "order") + . " as a RIGHT JOIN " . tablename(PDO_NAME . "member") + . " as b ON a.mid = b.id WHERE a.fkid = {$id} AND a.status !=0 AND a.status !=5 AND plugin = 'halfcard' AND a.uniacid = {$_W['uniacid']} " . $by); + $list = array_column($list , 'nickname'); + break;//折扣卡 + case 7: + $list = pdo_fetchall("SELECT b.nickname,b.avatar,b.encodename,a.bargainprice FROM " . tablename(PDO_NAME . "bargain_helprecord") + . " as a RIGHT JOIN " . tablename(PDO_NAME . "member") + . " as b ON a.mid = b.id WHERE a.activityid = {$id} AND a.uniacid = {$_W['uniacid']} " . $by); + break;//砍价商品 + case 8: + $list = pdo_fetchall("SELECT b.nickname,b.avatar,b.encodename FROM " . tablename(PDO_NAME . "order") + . " as a LEFT JOIN " . tablename(PDO_NAME . "member") + . " as b ON a.mid = b.id WHERE a.plugin = 'consumption' AND a.fkid = {$id} AND a.status !=0 AND a.status !=5 AND a.uniacid = {$_W['uniacid']} " . $by); + break;//积分商品 + } + if ($type == 4) { + foreach ($list as &$li) { + $li['day'] = ceil(($li['expiretime'] - $li['createtime']) / 86400); + $li['nickname'] = base64_decode($li['encodename']); + } + } + foreach ($list as &$li2) { + if (is_base64($li2['encodename'])) $li2['nickname'] = base64_decode($li2['encodename']); + } + } + $this->renderSuccess('商品购买弹幕列表' , $list); + } + /** + * Comment: 获取公告详细信息 + * Author: zzw + * Date: 2019/9/10 9:09 + */ + public function doPageNoticeDetail() + { + global $_W , $_GPC; + #1、获取参数信息 + $id = $_GPC['id'] OR $this->renderError('缺少参数:id'); + #1、获取详细信息 + $info = pdo_get(PDO_NAME . "notice" , ['id' => $id] , ['title' , 'content' , 'createtime']); + $info['createtime'] = date("Y-m-d H:i:s" , $info['createtime']); + $info ? $this->renderSuccess('公告详情' , $info) : $this->renderError('公告不存在!'); + } + /** + * Comment: 链接转换列表 + * Author: zzw + * Date: 2019/8/16 14:42 + */ + public function doPageTransformationLink(){ + $list = Links::getTransformationLink(); + + $this->renderSuccess('链接转换列表' , $list); + } + /** + * Comment: 文本替换内容 + * Author: wlf + * Date: 2019/09/19 16:20 + * @return array + */ + public function doPageTextSubstitution(){ + global $_W , $_GPC; + $data = Setting::wlsetting_read('trade'); + $base = Setting::wlsetting_read('base'); + $data['credittext'] = $data['credittext'] ? $data['credittext'] : '积分'; + $data['moneytext'] = $data['moneytext'] ? $data['moneytext'] : '余额'; + $data['halfcardtext'] = $data['halfcardtext'] ? $data['halfcardtext'] : '一卡通'; + $data['privilege'] = $data['privilege'] ? $data['privilege'] : '特权'; + $data['hljkttext'] = $data['hljkttext'] ? $data['hljkttext'] : '立即开通'; + $data['hljxftext'] = $data['hljxftext'] ? $data['hljxftext'] : '立即续费'; + if(empty($data['fxtext'])){ + $data['fxtext'] = Customized::init('distributionText') > 0 ? '共享股东' : '分销'; + } + $data['xxtext'] = $data['xxtext'] ? $data['xxtext'] : '客户'; + $data['sjtext'] = $data['sjtext'] ? $data['sjtext'] : '上级'; + $data['yjtext'] = $data['yjtext'] ? $data['yjtext'] : '佣金'; + if(empty($data['fxstext'])){ + $data['fxstext'] = Customized::init('distributionText') > 0 ? '共享股东' : '分销商'; + } + $data['myposter'] = $data['myposter'] ? $data['myposter'] : '我的海报'; + $data['sysname'] = $base['name'] ? $base['name'] : '智慧城市'; + $data['shangchengtext'] = $data['shangchengtext'] ? $data['shangchengtext'] : '商城'; + $data['shiylctext'] = $data['shiylctext'] ? $data['shiylctext'] : '使用流程'; + $data['jiagsmext'] = $data['jiagsmext'] ? $data['jiagsmext'] : '价格说明'; + $data['maidantext'] = $data['maidantext'] ? $data['maidantext'] : '买单'; + + //小程序审核模式 + $wxappset = Setting::wlsetting_read('wxappset'); + $data['examineing'] = $wxappset['examineing']; + $data['collocStatus'] = $wxappset['collocStatus'] ? : 0; + //小程序自定义头部 + $data['bgc'] = $wxappset['top_bg_color'] ? $wxappset['top_bg_color'] : '#ffffff'; + $data['textc'] = $wxappset['top_text_color'] == 1 ? '#ffffff': '#000000'; + //074定制 + $data['flag074'] = Customized::init('integral074') > 0 ? 1 : 0; + + $this->renderSuccess('文本替换' , $data); + } + /** + * Comment: 关注接口 + * Author: wlf + * Date: 2019/11/25 17:10 + * @return array + */ + public function doPageFollow() + { + global $_W , $_GPC; + $type = $this->conversion($_GPC['type']); + $data = []; + $forcefollow = $_W['wlsetting']['share']['forcefollow']; + if (!empty($_W['wlmember']['openid']) && $_W['source'] == 1) { + $follow = pdo_getcolumn('mc_mapping_fans' , ['openid' => $_W['wlmember']['openid']] , 'follow'); + if (empty($follow)) { + if (empty($type)) { //引导关注 + if ($_W['wlsetting']['share']['gz_status']) { + $data['status'] = 1; + } + } + else if (in_array($type , $forcefollow)) { + $data['status'] = 1; + } + } + } + if (empty($data['status'])) { + $data['status'] = 0; + $data['gzimage'] = ''; + $this->renderSuccess('不显示' , $data); + } + else { + $data['gzimage'] = tomedia($_W['wlsetting']['share']['gz_image']); + pdo_insert('wlmerchant_halfcard_qrscan' , [ + 'uniacid' => $_W['uniacid'] , + 'openid' => $_W['wlmember']['openid'] , + 'scantime' => time() , + 'cardid' => intval($_GPC['id']) , + 'type' => $type + ]); + if(Customized::init('pocket140') > 0){ + $data['korea'] = 1; + }else{ + $data['korea'] = 0; + } + $this->renderSuccess('显示关注信息' , $data); + } + } + /** + * Comment: 转换plugin参数 + * Author: wlf + * Date: 2019/11/26 14:43 + */ + public function conversion($type) + { + $types = [ + 1 => 'rush' , + 2 => 'groupon' , + 3 => 'wlfightgroup' , + 4 => 'activity', + 5 => 'wlcoupon' , + 6 => 'payOnline' , + 7 => 'bargain' , + 8 => 'helpBargain' , + 9 => 'distribution' , + 10 => 'draw', + 12 => 'pocket', + 11 => 'mobilerecharge', + 13 => 'integral' + ]; + return $types[$type]; + } + /** + * Comment: 获取默认分享信息 + * Author: wlf + * Date: 2019/09/23 15:21 + * @return array + */ + public function doPageShareinfo(){ + global $_W , $_GPC; + $data = []; + $nickname = $_W['wlmember']['nickname']; + $time = date("Y-m-d H:i:s" , time()); + $sysname = $_W['wlsetting']['base']['name']; + //初始化参数 + $pageinfo = $_GPC['pageinfo']; + if(strpos($pageinfo,'?') !== false ){ + $pagetype = strstr($pageinfo , '?' , true); + $pageparameter = strstr($pageinfo , '?'); + }else{ + $pagetype = $pageinfo; + $pageparameter = []; + } + $pageparameter = substr($pageparameter , 1); + $parameter = explode("&" , $pageparameter); + foreach ($parameter as $param) { + $t = explode('=' , $param); + $newArr[$t[0]] = $t[1]; + } + $parameter = $newArr; + $type = $parameter['type']; + $id = $parameter['id']; + //积分商品特殊处理 + $gtype = $parameter['goodsType']; + if(empty($id)){ + $id = $parameter['goods_id']; + if(!empty($parameter['goods_id'])){ + $type = $parameter['goodsType']; + } + } + if(empty($type)){ + $type = 2; + } + if (empty($pagetype)){ + $pagetype = 'pages/mainPages/index/index'; + } + //根据路径 获取对应的分享信息 + switch ($pagetype) { + case 'pages/subPages/goods/index': + if ($gtype == 'integral' || $type == 8) { + $gid = $parameter['goods_id']; + $goods = Consumption::creditshop_goods_get($gid); + $consumptionset = $_W['wlsetting']['consumption']; + if ($consumptionset['goods_title']) { + $title = $consumptionset['goods_title']; + $title = str_replace('[昵称]',$nickname,$title); + $title = str_replace('[时间]',$time,$title); + $title = str_replace('[系统名称]',$sysname,$title); + $title = str_replace('[商品名称]',$goods['title'],$title); + $title = str_replace('[原价]',$goods['old_price'],$title); + $title = str_replace('[所需积分]',$goods['use_credit1'],$title); + $title = str_replace('[所需金额]',$goods['use_credit2'],$title); + $data['title'] = $title; + } else { + $data['title'] = $goods['title']; + } + if ($consumptionset['goods_desc']) { + $desc = $consumptionset['goods_desc']; + $desc = str_replace('[昵称]',$nickname,$desc); + $desc = str_replace('[时间]',$time,$desc); + $desc = str_replace('[系统名称]',$sysname,$desc); + $desc = str_replace('[商品名称]',$goods['title'],$desc); + $desc = str_replace('[原价]',$goods['old_price'],$desc); + $desc = str_replace('[所需积分]',$goods['use_credit1'],$desc); + $desc = str_replace('[所需金额]',$goods['use_credit2'],$desc); + $data['desc'] = $desc; + } + $data['img'] = !empty($consumptionset['goods_image']) ? $consumptionset['goods_image'] : $goods['thumb']; + } //积分商品 + else if ($type == 1) { + $set = Setting::agentsetting_read('rush'); + $goods = pdo_get('wlmerchant_rush_activity',['id' => $id]); + $goods['vipdiscount'] = WeliamWeChat::getVipDiscount($goods['viparray'],-1); + $goods['vipprice'] = sprintf("%.2f",$goods['price'] - $goods['vipdiscount']); + $merchant = pdo_get('wlmerchant_merchantdata',['id' => $goods['sid']],['storename']); + if ($goods['share_title'] || $goods['share_desc']) { + if ($goods['vipstatus'] == 1) { + $vipstatus = '会员特价'; + } else if ($goods['vipstatus'] == 2) { + $vipstatus = '会员特供'; + } else { + $vipstatus = ''; + } + if ($goods['share_title']) { + $title = $goods['share_title']; + $title = str_replace('[昵称]',$nickname,$title); + $title = str_replace('[时间]',$time,$title); + $title = str_replace('[商品名称]',$goods['name'],$title); + $title = str_replace('[商户名称]',$merchant['storename'],$title); + $title = str_replace('[活动价]',$goods['price'],$title); + $title = str_replace('[特权类型]',$vipstatus,$title); + $title = str_replace('[会员价]',$goods['vipprice'],$title); + $title = str_replace('[原价]',$goods['oldprice'],$title); + } + if ($goods['share_desc']) { + $desc = $goods['share_desc']; + $desc = str_replace('[昵称]',$nickname,$desc); + $desc = str_replace('[时间]',$time,$desc); + $desc = str_replace('[商品名称]',$goods['name'],$desc); + $desc = str_replace('[商户名称]',$merchant['storename'],$desc); + $desc = str_replace('[活动价]',$goods['price'],$desc); + $desc = str_replace('[特权类型]',$vipstatus,$desc); + $desc = str_replace('[会员价]',$goods['vipprice'],$desc); + $desc = str_replace('[原价]',$goods['oldprice'],$desc); + } + } + if (empty($desc)) { + $desc = $set['share_desc']; + $desc = str_replace('[昵称]',$nickname,$desc); + $desc = str_replace('[时间]',$time,$desc); + } + $data['title'] = !empty($title) ? $title : $goods['name']; + $data['desc'] = $desc; + //1=公众号(默认);2=h5;3=小程序 + if ($_W['source'] == 3) { + $data['img'] = !empty($goods['share_wxapp_image']) ? $goods['share_wxapp_image'] : $goods['thumb']; + } else { + $data['img'] = !empty($goods['share_image']) ? $goods['share_image'] : $goods['thumb']; + } + } //抢购 + else if ($type == 2) { + $config = Setting::agentsetting_read('groupon'); + $goods = pdo_get('wlmerchant_groupon_activity',['id' => $id]); + $goods['vipdiscount'] = WeliamWeChat::getVipDiscount($goods['viparray'],-1); + $goods['vipprice'] = sprintf("%.2f",$goods['price'] - $goods['vipdiscount']); + $merchant = pdo_get('wlmerchant_merchantdata',['id' => $goods['sid']],['storename']); + if ($goods['share_title'] || $goods['share_desc']) { + if ($goods['vipstatus'] == 1) { + $vipstatus = '会员特价'; + } else if ($goods['vipstatus'] == 2) { + $vipstatus = '会员特供'; + } else { + $vipstatus = ''; + } + if ($goods['share_title']) { + $title = $goods['share_title']; + $title = str_replace('[昵称]',$nickname,$title); + $title = str_replace('[时间]',$time,$title); + $title = str_replace('[商品名称]',$goods['name'],$title); + $title = str_replace('[商户名称]',$merchant['storename'],$title); + $title = str_replace('[活动价]',$goods['price'],$title); + $title = str_replace('[特权类型]',$vipstatus,$title); + $title = str_replace('[会员价]',$goods['vipprice'],$title); + $title = str_replace('[原价]',$goods['oldprice'],$title); + $title = str_replace('[副标题]',$goods['subtitle'],$title); + } + if ($goods['share_desc']) { + $desc = $goods['share_desc']; + if (empty($desc)) { + $desc = $config['share_desc']; + $desc = str_replace('[系统名称]',$sysname,$desc); + } + $desc = str_replace('[昵称]',$nickname,$desc); + $desc = str_replace('[时间]',$time,$desc); + $desc = str_replace('[商品名称]',$goods['name'],$desc); + $desc = str_replace('[商户名称]',$merchant['storename'],$desc); + $desc = str_replace('[活动价]',$goods['price'],$desc); + $desc = str_replace('[特权类型]',$vipstatus,$desc); + $desc = str_replace('[会员价]',$goods['vipprice'],$desc); + $desc = str_replace('[原价]',$goods['oldprice'],$desc); + $desc = str_replace('[副标题]',$goods['subtitle'],$desc); + } + } + if (empty($desc)) { + $desc = $goods['subtitle']; + } + $data['title'] = !empty($title) ? $title : $goods['name']; + $data['desc'] = $desc; + //1=公众号(默认);2=h5;3=小程序 + if ($_W['source'] == 3) { + $data['img'] = !empty($goods['share_wxapp_image']) ? $goods['share_wxapp_image'] : $goods['thumb']; + } else { + $data['img'] = !empty($goods['share_image']) ? $goods['share_image'] : $goods['thumb']; + } + } //团购 + else if ($type == 3) { + $config = Setting::agentsetting_read('fightgroup'); + $goods = pdo_get('wlmerchant_fightgroup_goods',['id' => $id]); + $merchant = pdo_get('wlmerchant_merchantdata',['id' => $goods['merchantid']],['storename']); + if ($goods['share_title']) { + $title = $goods['share_title']; + $title = str_replace('[昵称]',$nickname,$title); + $title = str_replace('[时间]',$time,$title); + $title = str_replace('[商品名称]',$goods['name'],$title); + $title = str_replace('[商户名称]',$merchant['storename'],$title); + $title = str_replace('[拼团价]',$goods['price'],$title); + $title = str_replace('[原价]',$goods['oldprice'],$title); + $title = str_replace('[单购价]',$goods['aloneprice'],$title); + $title = str_replace('[会员减免金额]',$goods['vipdiscount'],$title); + $title = str_replace('[开团人数]',$goods['peoplenum'],$title); + } + if ($goods['share_desc']) { + $desc = $goods['share_desc']; + if (empty($desc)) { + $desc = $config['share_desc']; + $desc = str_replace('[系统名称]',$sysname,$desc); + } + $desc = str_replace('[昵称]',$nickname,$desc); + $desc = str_replace('[时间]',$time,$desc); + $desc = str_replace('[商品名称]',$goods['name'],$desc); + $desc = str_replace('[商户名称]',$merchant['storename'],$desc); + $desc = str_replace('[拼团价]',$goods['price'],$desc); + $desc = str_replace('[原价]',$goods['oldprice'],$desc); + $desc = str_replace('[单购价]',$goods['aloneprice'],$desc); + $desc = str_replace('[会员减免金额]',$goods['vipdiscount'],$desc); + $desc = str_replace('[开团人数]',$goods['peoplenum'],$desc); + } + if (empty($desc)) { + $desc = $config['share_desc']; + $desc = str_replace('[昵称]',$nickname,$desc); + $desc = str_replace('[时间]',$time,$desc); + } + $data['title'] = !empty($title) ? $title : $goods['name']; + $data['desc'] = $desc; + //1=公众号(默认);2=h5;3=小程序 + if ($_W['source'] == 3) { + $data['img'] = !empty($goods['share_wxapp_image']) ? $goods['share_wxapp_image'] : $goods['logo']; + } else { + $data['img'] = !empty($goods['share_image']) ? $goods['share_image'] : $goods['logo']; + } + } //拼团 + else if ($type == 5) { + $config = Setting::agentsetting_read('coupon'); + $goods = pdo_get('wlmerchant_couponlist',['id' => $id]); + $goods['vipdiscount'] = WeliamWeChat::getVipDiscount($goods['viparray'],-1); + $goods['vipprice'] = sprintf("%.2f",$goods['price'] - $goods['vipdiscount']); + $data['title'] = !empty($goods['title']) ? $goods['title'] : $config['share_title']; + $data['desc'] = !empty($goods['sub_title']) ? $goods['sub_title'] : $config['share_desc']; + //1=公众号(默认);2=h5;3=小程序 + if ($_W['source'] == 3) { + $data['img'] = !empty($goods['wxapp_shareimg']) ? $goods['wxapp_shareimg'] : $goods['logo']; + } else { + $data['img'] = !empty($goods['share_image']) ? $goods['share_image'] : $goods['logo']; + } + } //卡券 + else if ($type == 7) { + $goods = pdo_get('wlmerchant_bargain_activity',['id' => $id]); + $goods['vipdiscount'] = WeliamWeChat::getVipDiscount($goods['viparray'],-1); + $goods['vipprice'] = sprintf("%.2f",$goods['price'] - $goods['vipdiscount']); + $merchant = pdo_get('wlmerchant_merchantdata',['id' => $goods['sid']],['storename']); + if ($goods['share_title'] || $goods['share_desc']) { + if ($goods['vipstatus'] == 1) { + $vipstatus = '会员特价'; + } else if ($goods['vipstatus'] == 2) { + $vipstatus = '会员特供'; + } else { + $vipstatus = ''; + } + if ($goods['share_title']) { + $title = $goods['share_title']; + $title = str_replace('[昵称]',$nickname,$title); + $title = str_replace('[时间]',$time,$title); + $title = str_replace('[商品名称]',$goods['name'],$title); + $title = str_replace('[商户名称]',$merchant['storename'],$title); + $title = str_replace('[原价]',$goods['oldprice'],$title); + $title = str_replace('[底价]',$goods['price'],$title); + $title = str_replace('[特权类型]',$vipstatus,$title); + $title = str_replace('[会员底价]',$goods['vipprice'],$title); + } + if ($goods['share_desc']) { + $desc = $goods['share_desc']; + $desc = str_replace('[昵称]',$nickname,$desc); + $desc = str_replace('[时间]',$time,$desc); + $desc = str_replace('[商品名称]',$goods['name'],$desc); + $desc = str_replace('[商户名称]',$merchant['storename'],$desc); + $desc = str_replace('[原价]',$goods['oldprice'],$desc); + $desc = str_replace('[底价]',$goods['price'],$desc); + $desc = str_replace('[特权类型]',$vipstatus,$desc); + $desc = str_replace('[会员底价]',$goods['vipprice'],$desc); + } + } + $data['title'] = !empty($title) ? $title : $goods['name']; + $data['desc'] = $desc; + //1=公众号(默认);2=h5;3=小程序 + if ($_W['source'] == 3) { + $data['img'] = !empty($goods['share_wxapp_image']) ? $goods['share_wxapp_image'] : $goods['thumb']; + } else { + $data['img'] = !empty($goods['share_image']) ? $goods['share_image'] : $goods['thumb']; + } + } //砍价 + break;//商品详情分享 + case 'pages/mainPages/index/diypage': + case 'pages/mainPages/index/index': + //页面类型:1=自定义页面;2=商城首页;3=抢购首页;4=团购首页;5=卡券首页;6=拼团首页;7=砍价首页;8=好店首页;13=名片首页 + $diyset = Setting::agentsetting_read('diypageset');//装修设置信息 + switch ($type) { + //case 1: break;//自定义页面 + case 2: + $id = $diyset['page_index']; + break;//商城首页 + case 3: + $id = $diyset['page_rush']; + break;//抢购首页 + case 4: + $id = $diyset['page_groupon']; + break;//团购首页 + case 5: + $id = $diyset['page_wlcoupon']; + break;//卡券首页 + case 6: + $id = $diyset['page_wlfightgroup']; + break;//拼团首页 + case 7: + $id = $diyset['page_bargain']; + break;//砍价首页 + case 8: + $id = $diyset['page_shop']; + break;//好店首页 + //case 13:break;//名片首页 + case 15: + $id = $diyset['page_recruit']; + break;//求职招聘 + case 18: + $id = $diyset['page_housekeep']; + break;//家政服务 + } + //判断id是否存在 + if ($id > 0) { + //通过id获取信息 + $info = Diy::getPage($id,false); + $data['title'] = $info['data']['page']['share_title']; + $data['desc'] = $info['data']['page']['share_description']; + $data['img'] = $info['data']['page']['share_image']; + } + if (empty($data['title'])) { + switch ($type) { + case 3: + $set = Setting::agentsetting_read('rush'); + $data['title'] = $set['share_title']; + $data['desc'] = $set['share_desc']; + $data['img'] = $set['share_image']; + break;//抢购首页 + case 4: + $set = Setting::agentsetting_read('groupon'); + $data['title'] = $set['share_title']; + $data['desc'] = $set['share_desc']; + $data['img'] = $set['share_image']; + break;//团购首页 + case 5: + $set = Setting::agentsetting_read('coupon'); + $data['title'] = $set['share_title']; + $data['desc'] = $set['share_desc']; + $data['img'] = $set['share_image']; + break;//卡券首页 + case 6: + $set = Setting::agentsetting_read('fightgroup'); + $data['title'] = $set['share_title']; + $data['desc'] = $set['share_desc']; + $data['img'] = $set['share_image']; + break;//拼团首页 + case 7: + $set = Setting::agentsetting_read('bargainset'); + $data['title'] = $set['share_title']; + $data['desc'] = $set['share_desc']; + $data['img'] = $set['share_image']; + break;//砍价首页 + case 8: + $set = Setting::wlsetting_read('agentsStoreSet'); + $data['title'] = $set['merlist_title']; + $data['desc'] = $set['merlist_desc']; + $data['img'] = $set['merlist_image']; + break;//好店首页 + case 13: + $set = Setting::agentsetting_read('citycard'); + $data['title'] = $set['share_title']; + $data['desc'] = $set['share_desc']; + $data['img'] = $set['share_image']; + break;//名片首页 + case 15: + $set = Setting::agentsetting_read('recruit_set'); + $data['title'] = $set['share_title']; + $data['desc'] = $set['share_desc']; + $data['img'] = $set['share_image']; + break;//求职招聘 + case 16: + $set = Setting::wlsetting_read('dating_set'); + $data['title'] = $set['share_title']; + $data['desc'] = $set['share_desc']; + $data['img'] = $set['share_image']; + break;//相亲交友 + case 18: + $set = Setting::agentsetting_read('housekeep'); + $data['title'] = $set['share_title']; + $data['desc'] = $set['share_desc']; + if ($_W['source'] == 3) { + $data['img'] = $set['share_wxapp_image']; + }else{ + $data['img'] = $set['share_image']; + } + break;//家政服务 + } + } + break;//自定义页面分享 + case 'pages/subPages/integral/integralShop/integralShop': + $set = Setting::wlsetting_read('consumption'); + $data['title'] = $set['share_title']; + $data['desc'] = $set['share_desc']; + $data['img'] = $set['share_image']; + break;//积分商城首页 + case 'pages/subPages/signdesk/index/index': + $set = Setting::wlsetting_read('wlsign'); + $data['title'] = $set['share_title']; + $data['desc'] = $set['share_desc']; + $data['img'] = $set['share_image']; + break;//积分签到页面 + case 'pages/subPages/dealer/index/index': + case 'pages/subPages/dealer/apply/apply': + $set = Setting::wlsetting_read('distribution'); + $data['title'] = $set['share_title']; + $data['desc'] = $set['share_desc']; + $data['img'] = $set['share_image']; + break;//分销中心页面 + case 'pages/mainPages/store/index': + case 'pages/subPages2/businessCenter/foodList/foodList': + $set = Setting::wlsetting_read('agentsStoreSet'); + $id = $parameter['sid'] ? $parameter['sid'] : $parameter['storeid']; + $store = pdo_get('wlmerchant_merchantdata',['id' => $id],[ + 'storename', + 'logo', + 'mobile', + 'twolevel', + 'address', + 'describe', + 'wxapp_shareimg' + ]); + $data['title'] = $set['merdetail_title']; + $data['desc'] = $store['describe'] ? $store['describe'] : $set['merdetail_desc']; + $data['img'] = $set['merdetail_image']; + if (empty($data['img'])) { + if ($_W['source'] == 3) { + $data['img'] = !empty($store['wxapp_shareimg']) ? $store['wxapp_shareimg'] : $store['logo']; + } else { + $data['img'] = $store['logo']; + } + } + if ($data['title']) { + $data['title'] = str_replace('[昵称]',$nickname,$data['title']); + $data['title'] = str_replace('[时间]',$time,$data['title']); + $data['title'] = str_replace('[商户名称]',$store['storename'],$data['title']); + $data['title'] = str_replace('[商户电话]',$store['mobile'],$data['title']); + } else { + $data['title'] = $store['storename']; + } + if ($data['desc']) { + $data['desc'] = str_replace('[昵称]',$nickname,$data['desc']); + $data['desc'] = str_replace('[时间]',$time,$data['desc']); + $data['desc'] = str_replace('[商户名称]',$store['storename'],$data['desc']); + $data['desc'] = str_replace('[商户电话]',$store['mobile'],$data['desc']); + } else { + $data['desc'] = $store['address']; + } + break;//商户详情页面 + case 'pages/subPages/postDetails/postDetails': + $set = Setting::agentsetting_read('pocket'); + $inform = pdo_get('wlmerchant_pocket_informations',['id' => $id]); + if ($inform['type']) { + $typename = pdo_getcolumn(PDO_NAME.'pocket_type',['id' => $inform['type']],'title'); + } else { + $typename = '官方公告'; + } + if (empty($inform['avatar'])) { + if ($inform['mid']) { + $avatar = pdo_getcolumn(PDO_NAME.'member',['id' => $inform['mid']],'avatar'); + } else { + $avatar = tomedia($set['kefu_avatar']); + } + } else { + $avatar = $inform['avatar']; + } + $sharecontent = str_replace("\r\n","",$inform['content']); + $sharecontent = str_replace("\n","",$sharecontent); + $inform['img'] = unserialize($inform['img']); + if (is_array($inform['img'])) { + $shareimg = tomedia($inform['img'][0]); + } + if ($inform['share_title']) { + $data['title'] = $inform['share_title']; + } else { + $data['title'] = $inform['nickname'].'发布的'.$typename.'信息'; + } + $data['desc'] = $sharecontent; + if($_W['source'] == 3){ + $data['img'] = $shareimg ? $shareimg : 'default'; + }else{ + $data['img'] = $shareimg ? $shareimg : $avatar; + } + break;//掌上信息帖子分享 + case 'pages/mainPages/pocketIInformant/pocketIInformant': + case 'pages/mainPages/econdaryClassification/econdaryClassification': + $set = Setting::agentsetting_read('pocket'); + $data['title'] = $set['share_title']; + $data['desc'] = $set['share_desc']; + $data['img'] = $set['share_image']; + break;//掌上信息首页分享 + case 'pages/subPages/bargin/barginDetail/barginDetail': + $userid = $parameter['bargin_id']; + $userlist = pdo_get('wlmerchant_bargain_userlist',['id' => $userid],['activityid']); + $activity = pdo_get('wlmerchant_bargain_activity',['id' => $userlist['activityid']]); + $merchant = pdo_get('wlmerchant_merchantdata',['id' => $activity['sid']],['storename','enabled']); + if ($activity['share_title'] || $activity['share_desc']) { + if ($activity['vipstatus'] == 1) { + $vipstatus = '会员特价'; + } else if ($activity['vipstatus'] == 2) { + $vipstatus = '会员特供'; + } else { + $vipstatus = ''; + } + if ($activity['share_title']) { + $title = $activity['share_title']; + $title = str_replace('[昵称]',$nickname,$title); + $title = str_replace('[时间]',$time,$title); + $title = str_replace('[商品名称]',$activity['name'],$title); + $title = str_replace('[商户名称]',$merchant['storename'],$title); + $title = str_replace('[原价]',$activity['oldprice'],$title); + $title = str_replace('[底价]',$activity['price'],$title); + $title = str_replace('[特权类型]',$vipstatus,$title); + $title = str_replace('[会员底价]',$activity['vipprice'],$title); + } + if ($activity['share_desc']) { + $desc = $activity['share_desc']; + $desc = str_replace('[昵称]',$nickname,$desc); + $desc = str_replace('[时间]',$time,$desc); + $desc = str_replace('[商品名称]',$activity['name'],$desc); + $desc = str_replace('[商户名称]',$merchant['storename'],$desc); + $desc = str_replace('[原价]',$activity['oldprice'],$desc); + $desc = str_replace('[底价]',$activity['price'],$desc); + $desc = str_replace('[特权类型]',$vipstatus,$desc); + $desc = str_replace('[会员底价]',$activity['vipprice'],$desc); + } + } + $data['title'] = !empty($title) ? $title : $activity['name']; + $data['desc'] = $desc; + $data['img'] = !empty($activity['share_image']) ? $activity['share_image'] : $activity['thumb']; + break;//砍价活动详情页面 + case 'pages/mainPages/memberCard/memberCard': + $data['title'] = $_W['wlsetting']['halfcard']['share_title']; + $data['desc'] = $_W['wlsetting']['halfcard']['share_desc']; + $data['img'] = $_W['wlsetting']['halfcard']['share_image']; + break;//一卡通首页 + case 'pages/subPages/group/assemble/assemble': + $orderid = $parameter['orderid']; + $groupid = $parameter['group_id']; + $goods = pdo_get('wlmerchant_fightgroup_goods',['id' => $id]); + if ($orderid) { + $groupid = pdo_getcolumn(PDO_NAME.'order',['id' => $orderid],'fightgroupid'); + } + $group = pdo_get('wlmerchant_fightgroup_group',['id' => $groupid]); + $config = Setting::agentsetting_read('fightgroup'); + if ($config['group_share_title']) { + $title = $config['group_share_title']; + $title = str_replace('[昵称]',$nickname,$title); + $title = str_replace('[时间]',$time,$title); + $title = str_replace('[商品名称]',$goods['name'],$title); + $title = str_replace('[组团价]',$goods['price'],$title); + $title = str_replace('[原价]',$goods['oldprice'],$title); + $title = str_replace('[组团人数]',$goods['peoplenum'],$title); + $title = str_replace('[缺少人数]',$group['lacknum'],$title); + } + if ($config['group_share_desc']) { + $desc = $config['group_share_desc']; + $desc = str_replace('[昵称]',$nickname,$desc); + $desc = str_replace('[时间]',$time,$desc); + $desc = str_replace('[商品名称]',$goods['name'],$desc); + $desc = str_replace('[组团价]',$goods['price'],$desc); + $desc = str_replace('[原价]',$goods['oldprice'],$desc); + $desc = str_replace('[组团人数]',$goods['peoplenum'],$desc); + $desc = str_replace('[缺少人数]',$group['lacknum'],$desc); + } + $data['title'] = !empty($title) ? $title : $goods['name']; + $data['desc'] = $desc; + $data['img'] = !empty($config['group_share_image']) ? $config['group_share_image'] : $goods['logo']; + break;//拼团团详情页面 + case 'pages/subPages/businesscard/carddetail/carddetail': + $cardid = $parameter['cardid']; + $cardinfo = pdo_get('wlmerchant_citycard_lists',['id' => $cardid],[ + 'name', + 'logo', + 'company', + 'branch', + 'position', + 'desc', + 'one_class', + 'two_class' + ]); + $onelevelname = pdo_getcolumn(PDO_NAME.'citycard_cates',['id' => $cardinfo['one_class']],'name'); + $twolevelname = pdo_getcolumn(PDO_NAME.'citycard_cates',['id' => $cardinfo['two_class']],'name'); + $set = Setting::agentsetting_read('citycard'); + $data['title'] = $set['share_detail_title']; + $data['desc'] = $set['share_detail_desc']; + $data['img'] = $set['share_detail_image']; + if ($data['title']) { + $title = $data['title']; + $title = str_replace('[昵称]',$nickname,$title); + $title = str_replace('[时间]',$time,$title); + $title = str_replace('[系统名称]',$sysname,$title); + $title = str_replace('[名片名称]',$cardinfo['name'],$title); + $title = str_replace('[公司]',$cardinfo['company'],$title); + $title = str_replace('[部门]',$cardinfo['branch'],$title); + $title = str_replace('[职务]',$cardinfo['position'],$title); + $title = str_replace('[介绍]',$cardinfo['desc'],$title); + $title = str_replace('[一级分类]',$onelevelname,$title); + $title = str_replace('[二级分类]',$twolevelname,$title); + } + if ($data['desc']) { + $desc = $data['desc']; + $desc = str_replace('[昵称]',$nickname,$desc); + $desc = str_replace('[时间]',$time,$desc); + $desc = str_replace('[系统名称]',$sysname,$desc); + $desc = str_replace('[名片名称]',$cardinfo['name'],$desc); + $desc = str_replace('[公司]',$cardinfo['company'],$desc); + $desc = str_replace('[部门]',$cardinfo['branch'],$desc); + $desc = str_replace('[职务]',$cardinfo['position'],$desc); + $desc = str_replace('[介绍]',$cardinfo['desc'],$desc); + $desc = str_replace('[一级分类]',$onelevelname,$desc); + $desc = str_replace('[二级分类]',$twolevelname,$desc); + } + $data['title'] = $title; + $data['desc'] = $desc; + $data['img'] = $data['img'] ? tomedia($data['img']) : tomedia($cardinfo['logo']); + break;//名片详情分享 + case 'pages/mainPages/headline/headlineDetail': + $headlineId = $parameter['headline_id'] ? : $parameter['id']; + $headline = pdo_get(PDO_NAME."headline_content",['id' => $headlineId],[ + 'title', + 'display_img', + 'summary' + ]); + $data['title'] = $headline['title']; + $data['desc'] = $headline['summary']; + $data['img'] = tomedia($headline['display_img']); + break;//头条分享信息 + case 'pages/subPages/special/rushspeci/rushspeci': + $rushspeci = pdo_get(PDO_NAME."rush_special",['id' => $parameter['id']],[ + 'share_title', + 'share_desc', + 'thumb' + ]); + $data['title'] = $rushspeci['share_title']; + $data['desc'] = $rushspeci['share_desc']; + $data['img'] = tomedia($rushspeci['thumb']); + break;//抢购专题页面 + case 'pages/subPages2/businessCenter/businessCenter': + $deliverybase = Setting::agentsetting_read('citydelivery'); + $data['title'] = $deliverybase['share_title']; + $data['desc'] = $deliverybase['share_desc']; + $data['img'] = $deliverybase['share_image']; + break;//同城配送首页 + case 'pages/subPages2/businessCenter/foodIntroduced/foodIntroduced': + $goods = pdo_get('wlmerchant_delivery_activity',['id' => $parameter['id']],[ + 'name', + 'price', + 'oldprice', + 'thumb', + 'vipstatus', + 'vipdiscount', + 'share_title', + 'share_image', + 'share_desc' + ]); + if ($goods['vipstatus'] == 1) { + $vipstatus = '会员特价'; + } else if ($goods['vipstatus'] == 2) { + $vipstatus = '会员特供'; + } else { + $vipstatus = ''; + } + //标题 + if (empty($goods['share_title'])) { + $data['title'] = $goods['name']; + } else { + $data['title'] = $goods['share_title']; + $data['title'] = str_replace('[昵称]',$nickname,$data['title']); + $data['title'] = str_replace('[时间]',$time,$data['title']); + $data['title'] = str_replace('[商品名]',$goods['name'],$data['title']); + $data['title'] = str_replace('[活动价]',$goods['price'],$data['title']); + $data['title'] = str_replace('[特权类型]',$vipstatus,$data['title']); + $data['title'] = str_replace('[特权折扣]',$goods['vipdiscount'],$data['title']); + $data['title'] = str_replace('[市场价]',$goods['oldprice'],$data['title']); + } + //图片 + if (empty($goods['share_image'])) { + $data['img'] = tomedia($goods['thumb']); + } else { + $data['img'] = tomedia($goods['share_image']); + } + //描述 + if (empty($goods['share_desc'])) { + $data['desc'] = '快来购买吧~'; + } else { + $data['desc'] = $goods['share_desc']; + $data['desc'] = str_replace('[昵称]',$nickname,$data['desc']); + $data['desc'] = str_replace('[时间]',$time,$data['desc']); + $data['desc'] = str_replace('[商品名]',$goods['name'],$data['desc']); + $data['desc'] = str_replace('[活动价]',$goods['price'],$data['desc']); + $data['desc'] = str_replace('[特权类型]',$vipstatus,$data['desc']); + $data['desc'] = str_replace('[特权折扣]',$goods['vipdiscount'],$data['desc']); + $data['desc'] = str_replace('[市场价]',$goods['oldprice'],$data['desc']); + } + break;//同城配送商品 + case 'pages/subPages2/phoneBook/logistics/logistics': + $yellowpage = pdo_get('wlmerchant_yellowpage_lists',['id' => $parameter['id']],[ + 'name', + 'logo', + 'desc' + ]); + $data['title'] = $yellowpage['name']; + $data['desc'] = $yellowpage['desc']; + $data['img'] = tomedia($yellowpage['logo']); + break;//黄页114详情 + case 'pages/subPages2/phoneBook/phoneBook': + case 'pages/subPages2/phoneBook/phoneClass/phoneClass': + $yellowbase = Setting::agentsetting_read('yellowpage'); + $data['title'] = $yellowbase['share_title']; + $data['desc'] = $yellowbase['share_desc']; + $data['img'] = $yellowbase['share_image']; + break;//黄页114首页 + case 'pages/subPages2/drawGame/drawGame': + $info = pdo_get(PDO_NAME."draw",['id' => $id],['share_title','share_desc','share_img']); + $data['title'] = $info['share_title']; + $data['img'] = tomedia($info['share_img']); + $data['desc'] = $info['share_desc']; + break;//抽奖详情页 + case 'pages/subPages2/coursegoods/coursegoods': + $activity = pdo_get('wlmerchant_activitylist',['id' => $id],[ + 'share_title', + 'share_desc', + 'share_image', + 'title', + 'thumb', + 'vipstatus', + 'vipprice', + 'sid', + 'optionstatus', + 'price' + ]); + $merchant = pdo_get('wlmerchant_merchantdata',['id' => $activity['sid']],['storename']); + if (!empty($activity['share_title']) || !empty($activity['share_desc'])) { + if ($activity['vipstatus'] == 1) { + $vipstatus = '会员特价'; + } else if ($activity['vipstatus'] == 2) { + $vipstatus = '会员特供'; + } else { + $vipstatus = ''; + } + if ($activity['optionstatus'] > 0) { + $specs = pdo_getall('wlmerchant_activity_spec',['activityid' => $id],['price']); + $prices = array_column($specs,'price'); + $activity['price'] = min($prices).'起'; + } + if (!empty($activity['share_title'])) { + $title = $activity['share_title']; + $title = str_replace('[昵称]',$nickname,$title); + $title = str_replace('[时间]',$time,$title); + $title = str_replace('[活动名称]',$activity['title'],$title); + $title = str_replace('[商户名称]',$merchant['storename'],$title); + $title = str_replace('[报名价]',$activity['price'],$title); + $title = str_replace('[特权类型]',$vipstatus,$title); + $title = str_replace('[会员减免]',$activity['vipprice'],$title); + $data['title'] = $title; + } + if (!empty($activity['share_desc'])) { + $desc = $activity['share_desc']; + $desc = str_replace('[昵称]',$nickname,$desc); + $desc = str_replace('[时间]',$time,$desc); + $desc = str_replace('[活动名称]',$activity['title'],$desc); + $desc = str_replace('[商户名称]',$merchant['storename'],$desc); + $desc = str_replace('[报名价]',$activity['price'],$desc); + $desc = str_replace('[特权类型]',$vipstatus,$desc); + $desc = str_replace('[会员减免]',$activity['vipprice'],$desc); + $data['desc'] = $desc; + } + } + if (empty($data['title'])) { + $data['title'] = $activity['title']; + } + $data['img'] = !empty($activity['share_image']) ? tomedia($activity['share_image']) : tomedia($activity['thumb']); + break;//活动详情页面 + case 'pages/subPages2/coursegoods/localindex/localindex': + $settings = Setting::agentsetting_read('activity'); + $data['title'] = $settings['share_title']; + $data['desc'] = $settings['share_desc']; + $data['img'] = $settings['share_image']; + break;//活动列表页面 + case 'pages/subPages2/hirePlatform/recruitmentDetails/recruitmentDetails': + $recruit = pdo_get(PDO_NAME."recruit_recruit",['id' => $id],[ + 'title', + 'recruitment_type', + 'release_mid', + 'release_sid', + 'job_description' + ]); + //获取发布方信息 + if ($recruit['recruitment_type'] == 1) $logo = pdo_getcolumn(PDO_NAME."member",['id' => $recruit['release_mid']],'avatar'); + else $logo = pdo_getcolumn(PDO_NAME."merchantdata",['id' => $recruit['release_sid']],'logo'); //企业招聘 + $data['title'] = $recruit['title'].'——'.$sysname.'招聘'; + $data['desc'] = $recruit['job_description']; + $data['img'] = tomedia($logo); + break;//招聘详情 + case 'pages/subPages2/blindDate/member/detail': + $dating = pdo_get(PDO_NAME."dating_member",['id' => $id],['mid','introduce']); + [$dating['nickname'],$dating['avatar']] = Dating::handleUserInfo($dating['mid']); + //获取发布方信息 + $data['title'] = $dating['nickname']; + $data['desc'] = $dating['introduce'] ? : '这个人很懒,未留下自我介绍!'; + $data['img'] = tomedia($dating['avatar']); + break;//相亲交友相亲 + case 'pages/subPages2/homemaking/homemakingDetails/homemakingDetails': + $service = pdo_get('wlmerchant_housekeep_service',array('id' => $id),array('share_image','thumb','share_wxapp_image','share_title','share_desc','title','pricetype','price','unit')); + if($service['pricetype'] == 0){ + $price = '价格面议'; + }else if($service['pricetype'] == 1){ + $price = '预约金:¥'.$service['price'].'/'.$service['unit']; + }else if($service['pricetype'] == 2){ + $price = '¥'.$service['price'].'/'.$service['unit']; + } + if ($_W['source'] == 3) { + $data['img'] = !empty($service['share_wxapp_image']) ? $service['share_wxapp_image'] : $service['thumb']; + } else { + $data['img'] = !empty($service['share_image']) ? $service['share_image'] : $service['thumb']; + } + if ($service['share_title']) { + $title = $service['share_title']; + $title = str_replace('[昵称]',$nickname,$title); + $title = str_replace('[时间]',$time,$title); + $title = str_replace('[项目名称]',$service['title'],$title); + $title = str_replace('[价格]',$price,$title); + } + if ($service['share_desc']) { + $desc = $service['share_desc']; + $desc = str_replace('[昵称]',$nickname,$desc); + $desc = str_replace('[时间]',$time,$desc); + $desc = str_replace('[项目名称]',$service['title'],$desc); + $desc = str_replace('[价格]',$price,$desc); + } + $data['title'] = !empty($title) ? $title : $service['title']; + $data['desc'] = !empty($desc) ? $desc : '快来看看吧~'; + break;//家政服务详情页面 + case 'pages/subPages2/hitchRide/index/index': + $deliverybase = Setting::agentsetting_read('vehicle_set'); + $data['title'] = $deliverybase['share_title']; + $data['desc'] = $deliverybase['share_desc']; + $data['img'] = $deliverybase['share_image']; + break;//顺风车首页 + case 'pages/subPages2/hitchRide/hitchRideDetails/hitchRideDetails': + $vehicle = pdo_get('wlmerchant_vehicle',array('id' => $id),array('start_address','end_address','start_time','mid')); + $avatar = pdo_getcolumn(PDO_NAME.'member',array('id'=>$vehicle['mid']),'avatar'); + $data['title'] = '目的地:'.$vehicle['end_address']; + $data['desc'] = date('m-d H:i',$vehicle['start_time']).'从'.$vehicle['start_address'].'前往'.$vehicle['end_address']; + $data['img'] = tomedia($avatar); + break;//顺风车详情 + case 'pages/subPages/redpacket/redsquare': //红包广场 + case 'pages/subPages/redpacket/myredpacket': + $redset = Setting::wlsetting_read('red_pack_set'); + $data['title'] = $redset['share_title']; + $data['desc'] = $redset['share_desc']; + $data['img'] = $redset['share_image']; + break;//我的红包 + case 'pages/subPages2/voucherCenter/voucherCenter': + $redset = Setting::wlsetting_read('mobilerecharge'); + $data['title'] = $redset['share_title']; + $data['desc'] = $redset['share_desc']; + if ($_W['source'] == 3) { + $data['img'] = !empty($redset['share_wxapp_image']) ? $redset['share_wxapp_image'] : $redset['share_image']; + } else { + $data['img'] = $redset['share_image']; + } + break;//话费充值 + case 'pages/subPages2/lottery/lotteryIndex/lotteryIndex': + case 'pages/subPages2/lottery/lotteryList/lotteryList': + $draw = pdo_get('wlmerchant_luckydraw',array('id' => $id),array('title','share_title','share_desc','share_image','share_wxapp_image'));; + $data['title'] = $draw['share_title']; + $data['desc'] = $draw['share_desc']; + if ($_W['source'] == 3) { + $data['img'] = !empty($draw['share_wxapp_image']) ? $draw['share_wxapp_image'] : $draw['share_image']; + } else { + $data['img'] = $draw['share_image']; + } + if ($data['title']) { + $data['title'] = str_replace('[活动名称]',$draw['title'],$data['title']); + } + if ($data['desc']) { + $data['desc'] = str_replace('[活动名称]',$draw['title'],$data['desc']); + } + break;//锦鲤抽奖 + } + //获取默认分享设置 + if($_W['aid'] > 0) $settings = Setting::agentsetting_read('share_set');//代理商分享信息 + if(!$settings['share_title']) $settings = Setting::wlsetting_read('share');//不存在代理商分享信息时获取平台分享信息 + if (empty($data['title'])) { + $data['title'] = $settings['share_title']; + } else { + $data['title'] = str_replace('[昵称]' , $nickname , $data['title']); + $data['title'] = str_replace('[时间]' , $time , $data['title']); + $data['title'] = str_replace('[系统名称]' , $sysname , $data['title']); + } + if (empty($data['desc'])) { + $data['desc'] = $settings['share_desc']; + } else { + $data['desc'] = str_replace('[昵称]' , $nickname , $data['desc']); + $data['desc'] = str_replace('[时间]' , $time , $data['desc']); + $data['desc'] = str_replace('[系统名称]' , $sysname , $data['desc']); + } + if (empty($data['img'])) { + $data['img'] = tomedia($settings['share_image']); + if ($_W['source'] == 3) { + $data['img'] = !empty($settings['wxapp_share_image']) ? tomedia($settings['wxapp_share_image']) : tomedia($settings['share_image']);; + } else { + $data['img'] = tomedia($settings['share_image']); + } + }else if($data['img'] == 'default'){ + $data['img'] = ''; + } else { + $data['img'] = tomedia($data['img']); + } + $data['mpurl'] = $pageinfo; + //分销商关系绑定 + $head_id = intval($_GPC['head_id']); + if ($head_id > 0 && $_W['mid'] > 0 && p('distribution') && $_W['mid'] != $head_id) { + Distribution::addJunior($head_id, $_W['mid']); + $data['cleanheadid'] = 1; + } + //336定制 全民分销商 所有用户进入平台则自动成为分销商 + if(Customized::init('customized336') && intval($_W['mid']) > 0){ + //获取分销商设置信息 dis_model:0=默认模式;1=全民分销 + $set = $_W['wlsetting']['distribution']; + if($set['dis_model'] == 1){ + //获取分销商信息 + $disInfo = pdo_get(PDO_NAME."distributor",['mid'=>$_W['mid']]); + try { + if (!$disInfo) { + //没有分销商信息 添加分销商信息 + $disParams = [ + 'uniacid' => $_W['uniacid'] , + 'aid' => $_W['aid'] , + 'mid' => $_W['mid'] , + 'disflag' => 1 , + 'leadid' => $head_id ? : 0, + 'createtime' => time() , + 'nickname' => $_W['wlmember']['nickname'] , + 'realname' => $_W['wlmember']['realname'] , + 'mobile' => $_W['wlmember']['mobile'] , + 'expiretime' => 0 , + 'source' => 0 , + 'updatetime' => time() , + ]; + pdo_insert(PDO_NAME."distributor",$disParams); + $disId = pdo_insertid(); + if($disId > 0) pdo_update(PDO_NAME."member",['distributorid'=>$disId],['id'=>$_W['mid']]); + }else if ($disInfo['disflag'] == 0) { + //当前用户是下线 修改为分销商信息 + pdo_update(PDO_NAME."distributor",['leadid'=>$head_id,'disflag'=>1,'updatetime'=>time()],['id'=>$disInfo['id']]); + } + } catch (\Exception $e) { + $this->renderError($e->getMessage()); + } + } + } + + $this->renderSuccess('分享信息' , $data); + } + + + /** + * Comment: 模板id获取 + * Author: zzw + * Date: 2020/1/14 16:22 + */ + public function doPageTempId(){ + global $_W,$_GPC; + #1、参数获取 + $temp_type = $_GPC['temp_type']; + #2、模板id获取 + $set = Setting::wlsetting_read('new_temp_set'); + $data = [ + 0 => [ + 0 => [ + 'temp_id' => $set['pay']['weappSubscription']['id'] , + 'status' => $set['pay']['weappSubscription']['status'] , + 'type' => 2 , + 'temp_type' => 'pay' + ] + ],//提交订单按钮【订单支付成功通知】 + 1 => [ + 0 => [ + 'temp_id' => $set['after_sale']['weappSubscription']['id'] , + 'status' => $set['after_sale']['weappSubscription']['status'] , + 'type' => 2 , + 'temp_type' => 'after_sale' + ], + 1 => [ + 'temp_id' => $set['refund']['weappSubscription']['id'] , + 'status' => $set['refund']['weappSubscription']['status'] , + 'type' => 2 , + 'temp_type' => 'refund' + ], + ],//申请售后按钮【售后状态通知/退款通知】 + 2 => [ + 0 => [ + 'temp_id' => $set['fight']['weappSubscription']['id'] , + 'status' => $set['fight']['weappSubscription']['status'] , + 'type' => 2 , + 'temp_type' => 'fight' + ], + 1 => [ + 'temp_id' => $set['send']['weappSubscription']['id'] , + 'status' => $set['send']['weappSubscription']['status'] , + 'type' => 2 , + 'temp_type' => 'send' + ], + ],//回到首页、查看订单按钮 - 拼团商品 - 发货订单【拼团进度通知/订单发货通知】 + 3 => [ + 0 => [ + 'temp_id' => $set['fight']['weappSubscription']['id'] , + 'status' => $set['fight']['weappSubscription']['status'] , + 'type' => 2 , + 'temp_type' => 'fight' + ], + 1 => [ + 'temp_id' => $set['write_off']['weappSubscription']['id'] , + 'status' => $set['write_off']['weappSubscription']['status'] , + 'type' => 2 , + 'temp_type' => 'write_off' + ], + ],//回到首页、查看订单按钮 - 拼团商品 - 核销、自提订单【拼团进度通知/核销成功通知】 + 4 => [ + 0 => [ + 'temp_id' => $set['send']['weappSubscription']['id'] , + 'status' => $set['send']['weappSubscription']['status'] , + 'type' => 2 , + 'temp_type' => 'send' + ] + ],//回到首页、查看订单按钮 - 非拼团商品 - 发货订单【订单发货通知】 + 5 => [ + 0 => [ + 'temp_id' => $set['write_off']['weappSubscription']['id'] , + 'status' => $set['write_off']['weappSubscription']['status'] , + 'type' => 2 , + 'temp_type' => 'write_off' + ] + ],//回到首页、查看订单按钮 - 非拼团商品 - 核销、自提订单【核销成功通知】 + ]; + #2、信息处理 如果已存在授权信息 则不获取该订阅消息的授权信息 + $info = $data[$temp_type]; + foreach($info as $key => $val){ + $res = pdo_get(PDO_NAME."formid",['mid'=>$_W['mid'],'temp_type'=>$val['temp_type']]); + if($res) unset($info[$key]); + } + $info = is_array($info) ? array_values($info) : []; + + $this->renderSuccess('模板id',$info); + } + /** + * Comment: 储存小程序模板消息发送必须的form_id + * Author: zzw + * Date: 2019/11/1 9:24 + */ + public function doPageSetFromId(){ + global $_W , $_GPC; + $info = json_decode(base64_decode($_GPC['info']),true); + foreach($info as $key => $val){ + $data = [ + 'uniacid' => $_W['uniacid'] , + 'mid' => $_W['mid'] , + 'form_id' => $val['temp_id'] , + 'expiry_time' => time() + ((3600 * 24 * 7) - 3600) ,//过期时间为7天,偏移一小时作为时间差处理 + 'create_time' => time() , + 'type' => $val['type'] , + 'temp_type' => $val['temp_type'] + ]; + pdo_insert(PDO_NAME . "formid" , $data); + } + + $this->renderSuccess('储存form_id'); + } + + /** + * Comment: 获取订阅消息模板消息列表 + * Author: zzw + * Date: 2021/2/18 17:43 + */ + public function doPageGetTempList(){ + global $_W,$_GPC; + //参数获取 + $set = Setting::wlsetting_read('new_temp_set'); + if($_W['source'] == 3) $key = 'weappSubscription';//微信小程序 + else $key = 'wechatSubscription';//微信公众号 + $titleList = [ + 'pay' => '订单支付成功', + 'send' => '订单发货提醒', + 'after_sale' => '售后状态通知', + 'refund' => '退款成功通知', + 'service' => '业务处理通知', + 'write_off' => '核销成功提醒', + 'fight' => '拼团结果通知', + 'sign' => '签到成功通知', + 'change' => '积分变更提醒', + ]; + //修改获取信息 + $sql = " SELECT MAX(scene) FROM ".tablename(PDO_NAME."formid")." WHERE uniacid = {$_W['uniacid']} AND mid = {$_W['mid']} "; + $list = []; + foreach($set as $index => $item){ + if($item[$key]['status'] == 1){ + //基础信息获取 + $item[$key]['title'] = $titleList[$index]; + $item[$key]['num'] = pdo_count(PDO_NAME."formid",['uniacid'=>$_W['uniacid'],'mid'=>$_W['mid'],'form_id'=>$item[$key]['id']]); + $item[$key]['button'] = $item[$key]['num'] >= 1 ? 1 : 0;# 0 = 关闭 1 = 开启状态 + $item[$key]['temp_type'] = $index; + unset($item[$key]['status']); + $list[$index] = $item[$key]; + } + } + //信息拼装 + $params = $_W['account']->account ? : get_object_vars($_W['account']); + $data = [ + 'list' => array_values($list), + 'temp_id' => Setting::wlsetting_read('wechat_template_id') ? : '', + 'app_id' => $params['key'], + ]; + + $this->renderSuccess('模板id',$data); + } + /** + * Comment: 保存订阅的模板消息id + * Author: zzw + * Date: 2021/2/18 17:51 + */ + public function doPageSaveFromId(){ + global $_W , $_GPC; + $info = json_decode(html_entity_decode($_GPC['info']),true); + //信息判断 + if(!$info['form_id']) $this->renderError('模板id不存在,模板授权获取失败'); + if(!$info['temp_type']) $this->renderError('模板类型错误,模板授权获取失败'); + //信息拼装 + $data = [ + 'uniacid' => $_W['uniacid'] , + 'mid' => $_W['mid'] , + 'form_id' => $info['form_id'] , + 'expiry_time' => time() + ((3600 * 24 * 100) - 3600) ,//过期时间为7天,偏移一小时作为时间差处理 + 'create_time' => time() , + 'type' => $_W['source'] == 3 ? 2 : 3 ,//id类型:1=小程序模板消息id,2=小程序订阅消息id,3=公众号订阅消息id + 'temp_type' => $info['temp_type'], + ]; + pdo_insert(PDO_NAME . "formid" , $data); + + $this->renderSuccess('储存form_id'); + } + + /** + * 关闭订阅的模板消息id + * @author whj + * @date 2023-08-11 17:50 + */ + public function doPageOpenFromId() + { + global $_W, $_GPC; + $info = json_decode(html_entity_decode($_GPC['info']), true); + //信息判断 + if (!$info['form_id']) $this->renderError('模板id不存在,模板授权获取失败'); + if (!$info['temp_type']) $this->renderError('模板类型错误,模板授权获取失败'); + $res = pdo_get(PDO_NAME . "formid", ['mid' => $_W['mid'], 'temp_type' => $info['temp_type']]); + if ($res) { + pdo_delete(PDO_NAME . "formid", ['id' => $res['id']]); + $this->renderSuccess('关闭form_id'); + } + $this->renderError('订阅的模板消息不存在'); + } + + /** + * Comment: 获取平台客户设置信息 + * Author: zzw + * Date: 2019/11/1 16:15 + */ + public function doPageCustomerService() + { + global $_W , $_GPC; + #1、获取设置信息 + if($_W['aid']>0){ + $set = Setting::agentsetting_read('agentcustomer'); + }else{ + $set = Setting::wlsetting_read("customer"); + } + $set['qrcode'] = tomedia($set['qrcode']); + $set['susicon'] = tomedia($set['susicon']); + + $set['imgstyle']['width'] = !empty(trim($_W['wlsetting']['base']['width'])) ? trim($_W['wlsetting']['base']['width']) : 750; + $set['imgstyle']['height'] = !empty(trim($_W['wlsetting']['base']['height'])) ? trim($_W['wlsetting']['base']['height']) : 560; + + $set['listimgstyle']['width'] = !empty(trim($_W['wlsetting']['base']['listwidth'])) ? trim($_W['wlsetting']['base']['listwidth']) : 640; + $set['listimgstyle']['height'] = !empty(trim($_W['wlsetting']['base']['listheight'])) ? trim($_W['wlsetting']['base']['listheight']) : 300; + + $set['payclose'] = intval($_W['wlsetting']['base']['payclose']); + $set['wxappcur'] = $set['wxapptype'] ? : 0; + + $this->renderSuccess('客户设置信息' , $set); + } + /** + * Comment: 小程序客服消息 + * Author: zzw + * Date: 2019/11/19 9:07 + * @throws \GuzzleHttp\Exception\GuzzleException + */ + public function doPageWxAppCustomerService() + { + global $_W , $_GPC; + #1、接收信息 写入日志 + $input = $_GPC['__input']; + Util::wl_log('customerService' , PATH_MODULE . "log/" , $input , '微信小程序客服接收信息' , false); //写入日志记录 + #2、请求验证(配置信息时进行验证接口是否可用的请求验证) + $verRes = WeApp::pleaseVerification($_GET); + if ($verRes) { + echo $verRes; + die; + } + #2、不是验证消息 发送客服消息 + WeApp::CustomerService($input); + } + /** + * Comment: 选择信息获取 + * Author: zzw + * Date: 2019/11/27 15:50 + */ + public function doPageSelectInfo() + { + global $_W , $_GPC; + #1、参数获取 + $cate_one = $_GPC['cate_one']; + $cate_two = $_GPC['cate_two']; + //1=掌上信息;2=好店首页;3=积分商城;4=名片首页;5=同城配送;6=黄页114;7=求职招聘;8=企业;9=相亲交友; + $type = $_GPC['type'] ? : 1; + #2、生成选择信息数组 + switch ($type) { + case 1: + $whole = [ + [ + 'id' => '0' , + 'name' => '全部' , + 'list' => [] + ] + ]; + //获取掌上信息分类列表 + $list = pdo_fetchall("SELECT id,title as name FROM " . tablename(PDO_NAME . "pocket_type") . " WHERE aid = {$_W['aid']} AND uniacid = {$_W['uniacid']} AND url = '' AND status = 1 AND `type` = 0 AND isnav = 0 ORDER BY sort DESC,id DESC "); + if (is_array($list) && count($list) > 0) { + foreach ($list as $key => &$val) { + $val['list'] = pdo_fetchall("SELECT id,title as name FROM " . tablename(PDO_NAME . "pocket_type") . " WHERE url = '' AND status = 1 AND `type` = {$val['id']} ORDER BY sort DESC,id DESC "); + } + } + $list = array_merge($whole , $list); + //信息拼装 + $data = [ + 'top' => [ + ['title' => '区域' , 'subscript' => 'area' , 'status' => 1] , + ['title' => '分类' , 'subscript' => 'class' , 'status' => 1] , + ['title' => '排序' , 'subscript' => 'orders' , 'status' => 1] , + ] , + 'area' => 'do=WholeCityList' , + 'class' => $list , + 'orders' => [ + ['title' => '发帖时间' , 'val' => 0] , + ['title' => '浏览数量' , 'val' => 1] , + ['title' => '分享数量' , 'val' => 2] , + ['title' => '点赞数量' , 'val' => 3] , + ] , + ]; + break;//掌上信息 + case 2: + $whole = [ + [ + 'cate_one' => '0' , + 'name' => '全部' , + 'list' => [] + ] + ]; + //获取好店分类列表 + $shopList = pdo_fetchall("SELECT id as cate_one,`name` FROM " . tablename(PDO_NAME . "category_store") . " WHERE aid = {$_W['aid']} AND uniacid = {$_W['uniacid']} AND state = 0 AND parentid = 0 AND enabled = 1 ORDER BY displayorder DESC,id DESC "); + if (is_array($shopList) && count($shopList) > 0) { + foreach ($shopList as $shopKey => &$shopVal) { + if($cate_one == $shopVal['cate_one']){ + $shopVal['check'] = 1; + }else{ + $shopVal['check'] = 0; + } + $shopVal['list'] = pdo_fetchall("SELECT id as cate_two,`name` FROM " . tablename(PDO_NAME . "category_store") . " WHERE state = 0 AND parentid = {$shopVal['cate_one']} AND enabled = 1 ORDER BY displayorder DESC,id DESC"); + foreach ($shopVal['list'] as &$shop) { + if($cate_two == $shop['cate_two']){ + $shop['check'] = 1; + }else{ + $shop['check'] = 0; + } + } + } + } + $shopList = array_merge($whole , $shopList); + //信息拼装 + $data = [ + 'top' => [ + ['title' => '区域' , 'subscript' => 'area' , 'status' => 1] , + ['title' => '分类' , 'subscript' => 'class' , 'status' => 1] , + ['title' => '排序' , 'subscript' => 'orders' , 'status' => 1] , + ] , + 'area' => 'do=WholeCityList' , + 'class' => $shopList , + 'orders' => [ + ['title' => '默认排序' , 'val' => 0] , + ['title' => '创建时间' , 'val' => 1] , + ['title' => '店铺距离' , 'val' => 2] , + ['title' => '推荐设置' , 'val' => 3] , + ['title' => '浏览人气' , 'val' => 4] , + ] , + ]; + break;//好店首页 + case 3: + $whole = [ + [ + 'id' => '0' , + 'name' => '全部' + ] + ]; + //获取积分商品分类列表 + $classList = pdo_getall(PDO_NAME . "consumption_category" , [ + 'uniacid' => $_W['uniacid'] , + 'status' => 1 + ] , [ + 'id' , + 'name' + ] , '' , ' displayorder DESC,id DESC ' , ''); + $classList = array_merge($whole , $classList); + //信息拼装 + $data = [ + 'top' => [ + ['title' => '区域' , 'subscript' => 'area' , 'status' => 0] , + ['title' => '分类' , 'subscript' => 'class' , 'status' => 1] , + ['title' => '排序' , 'subscript' => 'orders' , 'status' => 1] , + ] , + 'area' => '' , + 'class' => $classList , + 'orders' => [ + ['title' => '创建时间' , 'val' => 1] , + ['title' => '默认设置' , 'val' => 3] , + ['title' => '浏览人气' , 'val' => 4] , + ] , + ]; + break;//积分商城 + case 4: + //获取好店分类列表 + $classList = pdo_fetchall("SELECT id as cate_one,`name` FROM " . tablename(PDO_NAME . "citycard_cates") . " WHERE aid = {$_W['aid']} AND uniacid = {$_W['uniacid']} AND enabled = 1 AND parentid = 0 ORDER BY sort DESC,id DESC"); + if (is_array($classList) && count($classList) > 0) { + foreach ($classList as $cardKey => &$cardVal) { + $cardVal['list'] = pdo_fetchall("SELECT id as cate_two,`name` FROM " . tablename(PDO_NAME . "citycard_cates") . " WHERE aid = {$_W['aid']} AND uniacid = {$_W['uniacid']} AND enabled = 1 AND parentid = {$cardVal['cate_one']} ORDER BY sort DESC,id DESC"); + } + } + $classList = array_merge([ + [ + 'cate_one' => '0' , + 'name' => '全部' , + 'list' => [] + ] + ] , $classList); + //信息拼装 + $data = [ + 'top' => [ + ['title' => '区域' , 'subscript' => 'area' , 'status' => 1] , + ['title' => '分类' , 'subscript' => 'class' , 'status' => 1] , + ['title' => '排序' , 'subscript' => 'orders' , 'status' => 1] , + ] , + 'area' => 'do=WholeCityList' , + 'class' => $classList , + 'orders' => [ + ['title' => '最新' , 'val' => 1] , + ['title' => '附近' , 'val' => 2] , + ['title' => '点赞榜' , 'val' => 3] , + ['title' => '人气榜' , 'val' => 4] , + ['title' => '收存榜' , 'val' => 5] , + ] , + ]; + break;//名片首页 + case 5: + $whole = [ + [ + 'cate_one' => '0' , + 'name' => '全部' , + 'list' => [] + ] + ]; + //获取好店分类列表 + $shopList = pdo_fetchall("SELECT id as cate_one,`name` FROM " . tablename(PDO_NAME . "category_store") . " WHERE aid = {$_W['aid']} AND uniacid = {$_W['uniacid']} AND state = 0 AND parentid = 0 AND enabled = 1 ORDER BY displayorder DESC,id DESC"); + if (is_array($shopList) && count($shopList) > 0) { + foreach ($shopList as $shopKey => &$shopVal) { + $shopVal['list'] = pdo_fetchall("SELECT id as cate_two,`name` FROM " . tablename(PDO_NAME . "category_store") . " WHERE state = 0 AND parentid = {$shopVal['cate_one']} AND enabled = 1 ORDER BY displayorder DESC,id DESC"); + } + } + $shopList = array_merge($whole , $shopList); + //信息拼装 + $data = [ + 'top' => [ + ['title' => '区域' , 'subscript' => 'area' , 'status' => 1] , + ['title' => '分类' , 'subscript' => 'class' , 'status' => 1] , + ['title' => '排序' , 'subscript' => 'orders' , 'status' => 1] , + ] , + 'area' => 'do=WholeCityList' , + 'class' => $shopList , + 'orders' => [ + ['title' => '附近' , 'val' => 0] , + ['title' => '最新' , 'val' => 1] , + ['title' => '推荐' , 'val' => 2] , + ['title' => '人气' , 'val' => 3] , + ] , + ]; + break;//同城配送 + case 6: + //获取好店分类列表 + $classList = pdo_fetchall("SELECT id as cate_one,`name` FROM " . tablename(PDO_NAME . "yellowpage_cates") . " WHERE aid = {$_W['aid']} AND uniacid = {$_W['uniacid']} AND enabled = 1 AND parentid = 0 ORDER BY sort DESC,id DESC"); + if (is_array($classList) && count($classList) > 0) { + foreach ($classList as $cardKey => &$cardVal) { + $cardVal['list'] = pdo_fetchall("SELECT id as cate_two,`name` FROM " . tablename(PDO_NAME . "yellowpage_cates") . " WHERE aid = {$_W['aid']} AND uniacid = {$_W['uniacid']} AND enabled = 1 AND parentid = {$cardVal['cate_one']} ORDER BY sort DESC,id DESC"); + } + } + $classList = array_merge([ + [ + 'cate_one' => '0' , + 'name' => '全部' , + 'list' => [] + ] + ] , $classList); + //信息拼装 + $data = [ + 'top' => [ + ['title' => '区域' , 'subscript' => 'area' , 'status' => 1] , + ['title' => '分类' , 'subscript' => 'class' , 'status' => 1] , + ['title' => '排序' , 'subscript' => 'orders' , 'status' => 1] , + ] , + 'area' => 'do=WholeCityList' , + 'class' => $classList , + 'orders' => [ + ['title' => '附近' , 'val' => 1] , + ['title' => '最新' , 'val' => 2] , + ['title' => '人气' , 'val' => 3] , + ['title' => '收藏' , 'val' => 4] , + ['title' => '推荐' , 'val' => 5] , + ] , + ]; + break;//黄页114首页 + case 7: + //信息拼装 + $data = [ + 'top' => [ + ['title' => '排序','subscript' => 'orders','status' => 1], + ['title' => '区域','subscript' => 'nwe_area','status' => 1], + ['title' => '职位','subscript' => 'industry','status' => 1], + //['title' => '工作类型','subscript' => 'job_type','status' => 1], + ['title' => '学历要求','subscript' => 'educational_experience','status' => 1], + ['title' => '经验要求','subscript' => 'work_experience','status' => 1], + ['title' => '薪资待遇','subscript' => 'salary','status' => 1], + ], + 'orders' => [ + ['title' => '推荐排序','val' => 1], + ['title' => '浏览量','val' => 2], + ['title' => '发布时间','val' => 3], + ], + 'nwe_area' => 'do=WholeCityList', + 'industry' => 'p=recruit&do=industryList', + 'job_type' => [ + ['title' => '不限','val' => 0], + ['title' => '全职','val' => 1], + ['title' => '兼职','val' => 2], + ['title' => '实习','val' => 3], + ], + 'educational_experience' => Recruit::getLabelList(1,'id as val,title'), + 'work_experience' => Recruit::getLabelList(3,'id as val,title'), + 'salary' => [ + ['title' => '不限','salary_min' => 0,'salary_max' => 0], + ['title' => '3K以下','salary_min' => 0,'salary_max' => 3000], + ['title' => '3~5K','salary_min' => 3000,'salary_max' => 5000], + ['title' => '5~10K','salary_min' => 5000,'salary_max' => 10000], + ], + ]; + break;//求职招聘 + case 8: + $data = [ + 'top' => [ + ['title' => '排序','subscript' => 'orders','status' => 1], + ['title' => '位置','subscript' => 'nwe_area','status' => 1], + ['title' => '行业','subscript' => 'education','status' => 1], + ['title' => '规模','subscript' => 'recruit_scale_id','status' => 1], + ['title' => '性质','subscript' => 'recruit_nature_id','status' => 1], + ], + 'orders' => [ + ['title' => '创建时间','val' => 1], + ['title' => '企业距离','val' => 2], + ['title' => '平台推荐','val' => 3], + ['title' => '浏览人气','val' => 4], + ], + 'nwe_area' => 'do=WholeCityList', + 'industry' => 'p=recruit&do=industryList', + 'recruit_scale_id' => Recruit::getLabelList(4,'id as val,title'), + 'recruit_nature_id' => Recruit::getLabelList(5,'id as val,title'), + ]; + break;//企业 + case 9: + $data = [ + 'top' => [ + ['title' => '排序','subscript' => 'sort','status' => 1], + ['title' => '位置','subscript' => 'area_id','status' => 1], + ['title' => '性别','subscript' => 'gneder','status' => 1], + ['title' => '婚姻情况','subscript' => 'marital_status','status' => 1], + ['title' => '学历','subscript' => 'education','status' => 1], + ['title' => '户籍类型','subscript' => 'registered_residence_type','status' => 1], + ['title' => '居住情况','subscript' => 'live','status' => 1], + ['title' => '出行情况','subscript' => 'travel','status' => 1], + ['title' => '类型','subscript' => 'get_type','status' => 1], + ], + 'sort' => [ + ['title' => '推荐排序','val' => 1], + ['title' => '浏览量','val' => 2], + ['title' => '发布时间','val' => 3], + ['title' => '距离排序','val' => 4], + ], + 'area_id' => 'do=WholeCityList', + 'gneder' => [ + ['title' => '不限','val' => 1], + ['title' => '男','val' => 2], + ['title' => '女','val' => 3], + ], + 'marital_status' => [ + ['title' => '未婚','val' => 1], + ['title' => '离异(无子女)','val' => 2], + ['title' => '离异(有抚养权)','val' => 3], + ['title' => '离异(无抚养权)','val' => 4], + ['title' => '丧偶(无子女)','val' => 5], + ['title' => '丧偶(有子女)','val' => 6], + ], + 'education' => [ + ['title' => '小学','val' => 1], + ['title' => '初中','val' => 2], + ['title' => '高中/中专','val' => 3], + ['title' => '专科','val' => 4], + ['title' => '本科','val' => 5], + ['title' => '硕士','val' => 6], + ['title' => '博士','val' => 7], + ], + 'registered_residence_type' => [ + ['title' => '农业户口','val' => 1], + ['title' => '非农业户口','val' => 2], + ], + 'live' => [ + ['title' => '自购房(有贷款)','val' => 1], + ['title' => '自购房(无贷款)','val' => 2], + ['title' => '租房(合租)','val' => 3], + ['title' => '租房(整租)','val' => 4], + ['title' => '与父母同住','val' => 5], + ['title' => '借住亲朋家','val' => 6], + ['title' => '单位住房','val' => 7], + ], + 'travel' => [ + ['title' => '未购车','val' => 1], + ['title' => '已购车','val' => 2], + ], + 'get_type' => [ + ['title' => '全部会员','val' => 0], + ['title' => '有视频','val' => 1], + ], + ]; + break;//相亲交友会员筛选 + } + $this->renderSuccess('选择信息列表' , $data); + } + /** + * Comment: 前端获取图片素材地址前缀 + * Author: wlf + * Date: 2020/05/12 10:40 + */ + public function doPageGetimgPrefix(){ + global $_W; + $data['imgPrefix'] = $_W['siteroot'].'addons/'.MODULE_NAME.'/h5/resource/wxapp/'; + $this->renderSuccess('图片素材前缀' , $data); + } + //调试接口,请勿删除 + public function doPageDemo(){ + global $_W , $_GPC; + #https://citydev.weliam.com.cn/addons/weliam_smartcity/core/common/uniapp.php?i=1&aid=125&do=demo + + + //红娘佣金到账通知 + //Dating::handleMatchmakerCommissionInfo(12,100,"测试红娘佣金到账通知"); +// $str = '这里是一句话的内容,这里是一句话的内容,这里是一句话的内容,这里是一句话的内容,这里是一句话的内容这里是一句话的内容,这里是一句话的内容,这里是一句话的内容,'; +// TempModel::subStr($str); + + + wl_debug("调试专用接口......"); + } + + + + + + /******** 城市管理/地区选择 ***************************************************************************************/ + /** + * Comment: 切换城市列表 + * Author: Hexin + */ + public function doPageCityList() + { + global $_W , $_GPC; + #1、参数获取 + $keyword = trim($_GPC['keyword']); + #2、获取定位类型 + $set = Setting::wlsetting_read("areaset"); + $location = $set['location'] ? $set['location'] : 0;//0=城市定位 1=精确定位 + if ($location == 0) { + //城市定位数据 + $citylists = Cache::getCache('urbanLocationData' , 'citylist'); + // if (!$citylists || !empty($keyword)) { + if (1 == 1) { + //查询条件生成 + $where = " WHERE a.uniacid = {$_W['uniacid']} AND a.status = 1 "; + if (!empty($keyword)) $where .= " AND b.name LIKE '%{$keyword}%' "; + //获取拥有代理商的地区列表 + $list = pdo_fetchall("SELECT b.*,a.aid FROM " . tablename(PDO_NAME . "oparea") . " as a RIGHT JOIN " . tablename(PDO_NAME . "area") . " as b ON a.areaid = b.id " . $where); + //获取热门地区 + $hotcityids = (new AgentareaTable())->selectFields('areaid')->searchWithUniacid($_W['uniacid'])->searchWithHot()->searchWithOpen()->getAreaList(); + $hotcityids = array_column($hotcityids , 'areaid'); + //重新定义数组信息 + if (count($list) > 0) { + foreach ($list as $city) { + $agentinfo = pdo_get('wlmerchant_agentusers' , ['id' => $city['aid']] , ['status' , 'endtime']); + if (($agentinfo['status'] == 1 && $agentinfo['endtime'] > time()) || empty($city['aid'])) { + $city['only_id'] = md5(uniqid(microtime(true) , true)); + if (!empty($keyword)) { + $newcitys[] = $city; + } + else { + $newcitys[$city['initial']][] = $city; + } + if (!empty($hotcityids) && in_array($city['id'] , $hotcityids)) { + $hotcitys[] = $city; + } + } + } + ksort($newcitys); + } + //拼装数据 并且写入缓存 + $citylists = ['hotcity' => $hotcitys , 'citylist' => $newcitys]; + if (!$keyword) { + //非搜索时才会进行缓存 + Cache::setCache('urbanLocationData' , 'citylist' , $citylists); + } + } + } + else { + //精确定位数据 + $areatable = new AreaTable(); + if (!empty($keyword)) { + //搜索地区时 + $citylists['citylist'] = $areatable->searchWithLevel(2)->searchWithKeyword($keyword)->searchWithOpen()->searchWithUniacid($_W['uniacid'])->selectFields([ + 'initial' , + 'id' , + 'name' + ])->getAreaList(); + } + else { + $citylists = Cache::getCache('area' , 'citylist'); + //获取所有市级地区 + $citys = $areatable->searchWithLevel(2)->searchWithOpen()->searchWithUniacid($_W['uniacid'])->selectFields([ + 'initial' , + 'id' , + 'name' + ])->getAreaList(); + //获取热门地区 + $hotcityids = (new AgentareaTable())->selectFields('areaid')->searchWithUniacid($_W['uniacid'])->searchWithHot()->searchWithOpen()->getAreaList(); + $hotcityids = array_column($hotcityids , 'areaid'); + $hotcitys = $newcitys = []; + foreach ($citys as $city) { + $city['only_id'] = md5(uniqid(microtime(true) , true)); + $newcitys[$city['initial']][] = $city; + } + if (!empty($hotcityids)) { + foreach ($hotcityids as &$hot) { + $hot = pdo_get('wlmerchant_area' , ['id' => $hot] , ['initial' , 'id' , 'name']); + } + } + $hotcitys = $hotcityids; + ksort($newcitys); + //写入缓存 + $citylists = ['hotcity' => $hotcitys , 'citylist' => $newcitys]; + Cache::setCache('area' , 'citylist' , $citylists); + } + } + $citylists['location'] = $location;//0=城市定位 1=精确定位 + + $this->renderSuccess('获取地址信息' , $citylists); + } + /** + * Comment: 根据城市ID或经纬度获取当前位置信息 + * Author: Hexin + */ + public function doPageCityLocation() + { + global $_W , $_GPC; + if (!empty($_GPC['citycode'])) { + $areatable = new AreaTable(); + $areatable->selectFields(['lat' , 'lng']); + $cityinfo = $areatable->getAreaById(intval($_GPC['citycode'])); + } + $lat = $cityinfo['lat'] ? $cityinfo['lat'] : trim($_GPC['lat']); + $lng = $cityinfo['lng'] ? $cityinfo['lng'] : trim($_GPC['lng']); + if (empty($lat) || empty($lng)) { + $area = MapService::guide_ip($_W['clientip']); + if (!is_error($area)) { + $lat = $area['result']['location']['lat']; + $lng = $area['result']['location']['lng']; + } + } + //获取当前城市 + $location = MapService::guide_gcoder($lat . ',' . $lng , 1); + $location['result']['ad_info']['only_id'] = md5(uniqid(microtime(true) , true)); + if (is_error($location)) { + $this->renderError($location['message']); + } + //城市id的再处理 当前区域 + $agentuser = pdo_getcolumn('wlmerchant_oparea' , [ + 'uniacid' => $_W['uniacid'] , + 'areaid' => $location['result']['ad_info']['adcode'] , + 'status' => 1 + ] , 'id'); + if (empty($agentuser) && !empty($_GPC['areaid'])) { + $location['result']['ad_info']['adcode'] = $_GPC['areaid']; + } + //城市id的再处理 下级区域 + if (is_array($location['result']['pois']) && count($location['result']['pois']) > 0) { + foreach ($location['result']['pois'] as &$poi) { + $flag = pdo_getcolumn(PDO_NAME . "oparea" , [ + 'areaid' => $poi['ad_info']['adcode'] , + 'status' => 1 , + 'uniacid' => $_W['uniacid'] + ] , 'aid'); + if (empty($flag)) { + $poi['ad_info']['adcode'] = pdo_getcolumn(PDO_NAME . 'area' , ['id' => $poi['ad_info']['adcode']] , 'pid'); + } + $poi['ad_info']['only_id'] = md5(uniqid(microtime(true) , true)); + } + } + $location['result']['ad_info']['location'] = $location['result']['location']; + $this->renderSuccess('success' , $location['result']); + } + /** + * Comment: 根据城市搜索地点 + * Author: Hexin + */ + public function doPageCitySearch() + { + global $_GPC; + $keyword = empty($_GPC['keyword']) ? $this->renderError("请填写搜索内容") : trim($_GPC['keyword']); + $city_name = empty($_GPC['city_name']) ? $this->renderError("请指定地区名称") : trim($_GPC['city_name']); + //获取当前城市 + $location = MapService::guide_search($keyword , "region(" . urlencode($city_name) . ",0)"); + if (is_error($location)) { + $this->renderError($location['message']); + } + $this->renderSuccess('success' , $location['data']); + } + /** + * Comment: 获取微信jssdk + * Author: Hexin + */ + public function doPageGetJssdk() + { + global $_W , $_GPC; + $unisetting = uni_setting_load(); + if (!empty($unisetting['jsauth_acid'])) { + $jsauth_acid = $unisetting['jsauth_acid']; + } else { + if ($_W['account']['level'] < ACCOUNT_SUBSCRIPTION_VERIFY && !empty($unisetting['oauth']['account'])) { + $jsauth_acid = $unisetting['oauth']['account']; + } else { + $jsauth_acid = $_W['acid']; + } + } + + $url = !empty($_GPC['sign_url']) ? urldecode($_GPC['sign_url']) : $_W['siteroot'] . "app/index.php?i=" . $_W['uniacid'] . "&c=entry&m=" . MODULE_NAME . "&p=area&ac=region&do=index"; + $account_api = WeAccount::create($jsauth_acid); + if (!is_error($account_api)) { + $jssdkconfig = $account_api->getJssdkConfig($url); + }else{ + $account_api = WeAccount::create($_W['uniacid']); + if (!is_error($account_api)) { + $jssdkconfig = $account_api->getJssdkConfig($url); + } + } + $this->renderSuccess('success' , $jssdkconfig); + } + /** + * Comment: 获取区域列表 + * Author: zzw + * Date: 2019/10/18 11:36 + */ + public function doPageWholeCityList() + { + global $_W , $_GPC; + #1、参数获取 + $cityId = $_GPC['city_id'] OR $this->renderError('缺少参数:city_id'); + #2、区域列表获取 + $id = pdo_fetch("SELECT + CASE WHEN pid > 0 THEN (SELECT id FROM " . tablename(PDO_NAME . 'area') . " as b WHERE b.id = a.pid) + ELSE a.id + END as id + FROM " . tablename(PDO_NAME . "area") . " as a WHERE a.id = {$cityId} "); +// $id = $cityId; +// $lowlist = pdo_getcolumn(PDO_NAME.'area',array('pid'=>$id),'id'); +// if(empty($lowlist)){ +// $id = pdo_getcolumn(PDO_NAME.'area',array('id'=>$id),'pid'); +// } + $list = pdo_get(PDO_NAME . "area" , ['id' => $id] , ['id' , 'name']); + $list['select'] = 1; + $list['list'] = pdo_fetchall("SELECT id,name FROM ".tablename(PDO_NAME."area") ." WHERE (displayorder = {$_W['uniacid']} OR displayorder = 0 ) AND pid = ".$list['id']); + foreach ($list['list'] as $key => &$val) { + $val['select'] = 0; + //判断是否选中 + if ($val['id'] == $cityId) $val['select'] = 1; + //获取下级信息 + $val['list'] = pdo_getall(PDO_NAME . "area" , ['pid' => $val['id']] , ['id' , 'name']); + foreach ($val['list'] as $k => &$v) { + $v['select'] = 0; + //判断是否选中 + if ($v['id'] == $cityId) { + $v['select'] = 1; + $val['select'] = 1; + } + } + } + array_unshift($list['list'],['id'=>$id,'name'=>'全部','select'=>0,'list'=>[]]); + $this->renderSuccess('区域列表' , $list); + } + /** + * Comment: 通过经纬度/IP/地区id获取代理id + * Author: WLF + * Date: 2019/11/06 13:46 + */ + public function doPageGetAid() + { + global $_W , $_GPC; + $settings = Setting::wlsetting_read('areaset'); + $data = []; + $lat = $_GPC['lat']; + $lng = $_GPC['lng']; + $areaid = $_GPC['areaid']; + //处理特殊 + if($areaid == '411603'){ + $areaid = '411626'; + } + $cityname = $_GPC['cityname']; + $aid = $_GPC['aid']; + if(!empty($aid) && $aid != 'undefined' && empty($areaid) && empty($cityname)){ + $areaid = pdo_getcolumn(PDO_NAME.'oparea',array('uniacid'=>$_W['uniacid'],'aid'=>$aid),'areaid'); + } + //优先使用前端传过来的areaid 没有则通过经纬度获取 + if(empty($areaid) && empty($settings['location'])){ + $area = pdo_get(PDO_NAME . 'oparea' , ['uniacid' => $_W['uniacid'] ,'aid' => $_W['aid'],'status' => 1] , ['areaid']); + $areaid = $area['areaid']; + } + if (!empty($lat) && !empty($lng) && empty($areaid)) { + $area = MapService::guide_gcoder($lat . ',' . $lng , 0); + if (!is_error($area)) { + $areaid = $area['result']['ad_info']['adcode']; + $defaultareaname = pdo_getcolumn(PDO_NAME.'area',array('id'=>$areaid),'name'); + } + } + //都不行通过IP获取 + if (empty($areaid)) { + $area = MapService::guide_ip($_W['clientip']); + if (!is_error($area)) { + $areaid = $area['result']['ad_info']['adcode']; + } + } + $area = pdo_get(PDO_NAME . 'oparea' , [ + 'uniacid' => $_W['uniacid'] , + 'areaid' => $areaid , + 'status' => 1 + ] , ['aid' , 'id' , 'areaid']); + //如果当前地区不存在代理 获取一下城市代理 + if (empty($area['id'])) { + $pinfo = pdo_get(PDO_NAME . 'area' , ['id' => $areaid] , ['pid' , 'level' , 'name']); + $data['areaname'] = $pinfo['name']; + $area = pdo_get(PDO_NAME . 'oparea' , [ + 'uniacid' => $_W['uniacid'] , + 'areaid' => $pinfo['pid'] , + 'status' => 1 + ] , ['aid' , 'id' , 'areaid']); + if ($pinfo['level'] == 3 && empty($area['id'])) { //查询一级地区 + $pinfo = pdo_get(PDO_NAME . 'area' , ['id' => $pinfo['pid']] , ['pid']); + $area = pdo_get(PDO_NAME . 'oparea' , [ + 'uniacid' => $_W['uniacid'] , + 'areaid' => $pinfo['pid'] , + 'status' => 1 + ] , ['aid' , 'id' , 'areaid']); + } + } + if (empty($area['id'])) { //没有查询到相关地区 + if (empty($settings['location'])) { //城市定位 +// $citynum = pdo_fetchcolumn('SELECT count(id) FROM ' . tablename('wlmerchant_oparea') . " WHERE uniacid = {$_W['uniacid']} AND status = 1"); + $settings['defaultAid'] = $settings['defaultAid']> 0 ? $settings['defaultAid'] : 0; + $aid = pdo_get(PDO_NAME . 'oparea' , ['aid' => $settings['defaultAid'],'uniacid' => $_W['uniacid'] ] , [ + 'areaid' , + 'aid' + ]); + $data['aid'] = $aid['aid']; + $data['areaname'] = pdo_getcolumn(PDO_NAME . 'area' , ['id' => $aid['areaid']] , 'name'); + +// $aid = pdo_get(PDO_NAME . 'oparea' , ['uniacid' => $_W['uniacid'] , 'status' => 1] , [ +// 'areaid' , +// 'aid' +// ]); +// $data['aid'] = $aid['aid']; +// $data['areaname'] = pdo_getcolumn(PDO_NAME . 'area' , ['id' => $aid['areaid']] , 'name'); +// +// else { +// $data['status'] = 3; +// $this->renderSuccess('选择地区' , $data); +// } + } + else { //精准定位 + if ($settings['datashow'] == 1) { + $data['status'] = 1; + $data['message'] = '未开通地区,显示加盟申请'; + $data['name'] = $_W['wlsetting']['base']['name']; + $data['phone'] = $_W['wlsetting']['base']['phone']; + } + else if ($settings['datashow'] == 2) { + $data['status'] = 2; + $data['message'] = '未开通地区,显示暂未开通'; + $data['name'] = $_W['wlsetting']['base']['name']; + $data['phone'] = $_W['wlsetting']['base']['phone']; + }else if($settings['datashow'] == 3){ + $data['aid'] = $settings['defaultAid']; + $data['areaid'] = pdo_getcolumn(PDO_NAME . 'oparea' , [ + 'uniacid' => $_W['uniacid'] , + 'aid' => $settings['defaultAid'] + ] , 'areaid'); + $data['areaname'] = !empty($defaultareaname) ? $defaultareaname : pdo_getcolumn(PDO_NAME . 'area' , ['id' => $data['areaid']] , 'name'); + } + else { + $data['aid'] = 0; + $data['areaid'] = pdo_getcolumn(PDO_NAME . 'oparea' , [ + 'uniacid' => $_W['uniacid'] , + 'aid' => 0 + ] , 'areaid'); + $data['areaname'] = !empty($defaultareaname) ? $defaultareaname : pdo_getcolumn(PDO_NAME . 'area' , ['id' => $data['areaid']] , 'name'); + } + } + } + else { + $data['aid'] = $area['aid']; + $data['areaid'] = $area['areaid']; + $data['areaname'] = pdo_getcolumn(PDO_NAME . 'area' , ['id' => $data['areaid']] , 'name'); + } + if (!empty($cityname)) { + $data['areaname'] = $cityname; + } + $data['lat'] = $lat; + $data['lng'] = $lng; + $this->renderSuccess('代理id' , $data); + } + /** + * Comment: 获取当前地址换区提示文本 + * Author: WLF + * Date: 2020/05/15 11:25 + */ + public function doPageAidtip(){ + global $_W , $_GPC; + $lat = trim($_GPC['lat']); + $lng = trim($_GPC['lng']); + $aid = trim($_GPC['aid']); + if(empty($lat) || empty($lng)){ + $this->renderError('定位失败,请开启相应权限'); + } + $area = MapService::guide_gcoder($lat.','.$lng,0); + if (!is_error($area)) { + $areaid = $area['result']['ad_info']['adcode']; + }else{ + $this->renderError($area['message']); + } + $area = pdo_get(PDO_NAME . 'oparea' , [ + 'uniacid' => $_W['uniacid'] , + 'areaid' => $areaid , + 'status' => 1 + ] , ['aid' , 'id' , 'areaid']); + //如果当前地区不存在代理 获取一下城市代理 + if (empty($area['id'])) { + $pinfo = pdo_get(PDO_NAME . 'area' , ['id' => $areaid] , ['pid' , 'level' , 'name']); + $data['areaname'] = $pinfo['name']; + $area = pdo_get(PDO_NAME . 'oparea' , [ + 'uniacid' => $_W['uniacid'] , + 'areaid' => $pinfo['pid'] , + 'status' => 1 + ] , ['aid' , 'id' , 'areaid']); + if ($pinfo['level'] == 3 && empty($area['id'])) { //查询一级地区 + $pinfo = pdo_get(PDO_NAME . 'area' , ['id' => $pinfo['pid']] , ['pid']); + $area = pdo_get(PDO_NAME . 'oparea' , [ + 'uniacid' => $_W['uniacid'] , + 'areaid' => $pinfo['pid'] , + 'status' => 1 + ] , ['aid' , 'id' , 'areaid']); + } + } + if(empty($area['id']) || $area['aid'] == $aid){ + $this->renderSuccess('无提示',['status' => 2]); + }else{ + $data['status'] = 1; + $data['memberCityName'] = pdo_getcolumn(PDO_NAME.'area',array('id'=>$area['areaid']),'name'); + $data['memberCityAid'] = $area['aid']; + $data['memberCityAreaid'] = $area['areaid']; + $this->renderSuccess('提示切换',$data); + } + + } + /** + * Comment: 获取当前代理商所在的区域(仅获取当前区域级以下的区域) + * Author: zzw + * Date: 2021/4/15 10:11 + */ + public function doPageGetNowCity(){ + global $_W,$_GPC; + //获取当前代理商区域信息 + $agentAreaId = pdo_getcolumn(PDO_NAME."oparea",['uniacid'=>$_W['uniacid'],'aid'=>$_W['aid']],'areaid'); + $agentArea = pdo_get(PDO_NAME."area",['id'=>$agentAreaId],['id','pid','level']); + if($agentArea['level'] == 4) $agentArea = pdo_get(PDO_NAME."area",['id'=>$agentArea['pid']],['id','pid','level']);//当前代理为四级时获取三级的信息 + //根据等级获取内容 + switch ($agentArea['level']){ + case 1: + $list = Area::getAreaList(['id'=>$agentArea['id']]);//获取当前省信息 + foreach($list as &$listVal){ + $listVal['area'] = Area::getAreaList(['pid'=>$agentArea['id']]);//获取下级市信息 + foreach($listVal['area'] as &$areaVal){ + $areaVal['dist'] = Area::getAreaList(['pid'=>$areaVal['id']]);//获取下级区县信息 + } + } + break;//当前区域为省 + case 2: + $list = Area::getAreaList(['id'=>$agentArea['pid']]);//获取上级省信息 + foreach($list as &$listVal){ + $listVal['area'] = Area::getAreaList(['id'=>$agentArea['id']]);//获取当前市信息 + foreach($listVal['area'] as &$areaVal){ + $areaVal['dist'] = Area::getAreaList(['pid'=>$areaVal['id']]);//获取下级区县信息 + } + } + break;//当前区域为市 + case 3: + $areaPid = pdo_getcolumn(PDO_NAME."area",['id'=>$agentArea['pid']],'pid'); + $list = Area::getAreaList(['id'=>$areaPid]);//获取上级省信息 + foreach($list as &$listVal){ + $listVal['area'] = Area::getAreaList(['id'=>$agentArea['pid']]);//获取上级市信息 + foreach($listVal['area'] as &$areaVal){ + $areaVal['dist'] = Area::getAreaList(['id'=>$agentArea['id']]);//获取下级区县信息 + } + } + break;//当前区域为区、县 + } + + $this->renderSuccess('当前区域相关区域信息',$list); + } + + + + + /******** 装修功能管理/装修功能对应操作 ****************************************************************************/ + /** + * Comment: 获取平台菜单信息 + * Author: zzw + * Date: 2019/7/25 16:17 + */ + public function doPageBottomMenu() + { + global $_W , $_GPC; + #1、获取设置信息 + $type = intval($_GPC['type']) ? intval($_GPC['type']) : 2; + $id = $_GPC['id'] ? : 0; + //页面类型:1=自定义页面;2=商城首页;3=抢购首页;4=团购首页;5=卡券首页;6=拼团首页;7=砍价首页; + //8=好店首页;9=掌上信息;10=积分商城;11=积分签到;12=头条首页;13=名片首页;14=活动首页;15=招聘首页; + //16=相亲交友;17=一卡通首页默认菜单;18=家政首页默认菜单 + $set = Setting::agentsetting_read("diypageset"); + switch ($type) { + case 1: + if ($id > 0) { + #2、页面配置信息获取 + $pageset = Diy::getPage($id , false); + $pageInfo = $pageset['data']['page'];//本页面标题信息 + if($pageInfo['diymenu'] > 0) $menudata = Diy::getMenu($pageInfo['diymenu']);//自定义菜单 + else if($pageInfo['diymenu'] == -1) $menudata = DiyMenu::defaultBottomMenu();//默认菜单 + } + + $menudata = is_array($menudata) ? $menudata : []; + break;//自定义页面默认菜单 + case 2: + if ($set['menu_index'] > 0) $menudata = Diy::getMenu($set['menu_index']); + else $menudata = DiyMenu::defaultBottomMenu(); + break;//商城首页默认菜单 + case 3: + if ($set['menu_rush'] > 0) $menudata = Diy::getMenu($set['menu_rush']); + else $menudata = DiyMenu::defaultRushMenu(); + break;//抢购首页默认菜单 + case 4: + if ($set['menu_groupon'] > 0) $menudata = Diy::getMenu($set['menu_groupon']); + else $menudata = DiyMenu::defaultGroupMenu(); + break;//团购首页默认菜单 + case 5: + if ($set['menu_wlcoupon'] > 0) $menudata = Diy::getMenu($set['menu_wlcoupon']); + else $menudata = DiyMenu::defaultCouponMenu(); + break;//卡券首页默认菜单 + case 6: + if ($set['menu_wlfightgroup'] > 0) $menudata = Diy::getMenu($set['menu_wlfightgroup']); + else $menudata = DiyMenu::defaultFightMenu(); + break;//拼团首页默认菜单 + case 7: + if ($set['menu_bargain'] > 0) $menudata = Diy::getMenu($set['menu_bargain']); + else $menudata = DiyMenu::defaultBargainMenu(); + break;//砍价首页默认菜单 + case 8: + if ($set['menu_storepage'] > 0) $menudata = Diy::getMenu($set['menu_storepage']); + else $menudata = DiyMenu::defaultBottomMenu(); + break;//自定义页面默认菜单 + case 9: + if ($set['menu_pocket'] > 0) $menudata = Diy::getMenu($set['menu_pocket']); + else $menudata = DiyMenu::defaultPocketMenu(); + break;//掌上信息默认菜单 + case 10: + if ($set['menu_consumption'] > 0) $menudata = Diy::getMenu($set['menu_consumption']); + else $menudata = DiyMenu::defaultConsumptionMenu(); + break;//积分商城默认菜单 + case 11: + if ($set['menu_wlsign'] > 0) $menudata = Diy::getMenu($set['menu_wlsign']); + else $menudata = DiyMenu::defaultSignMenu(); + break;//积分签到默认菜单 + case 12: + if ($set['menu_headline'] > 0) $menudata = Diy::getMenu($set['menu_headline']); + else $menudata = DiyMenu::defaultHeadlineMenu(); + break;//头条首页默认菜单 + case 13: + if ($set['menu_card'] > 0) $menudata = Diy::getMenu($set['menu_card']); + else $menudata = DiyMenu::defaultCardMenu(); + break;//名片首页默认菜单 + case 14: + if ($set['menu_activity'] > 0) $menudata = Diy::getMenu($set['menu_activity']); + else $menudata = DiyMenu::defaultBottomMenu(); + break;//一卡通首页默认菜单 + case 15: + if ($set['menu_recruit'] > 0) $menudata = Diy::getMenu($set['menu_recruit']); + else $menudata = DiyMenu::defaultRecruitMenu(); + break;//求职招聘菜单信息 + case 16: + if ($set['menu_dating'] > 0) $menudata = Diy::getMenu($set['menu_dating']); + else $menudata = DiyMenu::defaultDatingMenu(); + break;//相亲交友菜单信息 + case 17: + if ($set['menu_half'] > 0) $menudata = Diy::getMenu($set['menu_half']); + else $menudata = DiyMenu::defaultBottomMenu(); + break;//一卡通首页默认菜单 + case 18: + if ($set['menu_housekeep'] > 0) $menudata = Diy::getMenu($set['menu_housekeep']); + else $menudata = DiyMenu::defaultHouseKeepMenu(); + break;//家政首页默认菜单 + case 19: + if ($set['menu_yellow'] > 0) $menudata = Diy::getMenu($set['menu_yellow']); + else $menudata = DiyMenu::defaultYellowMenu(); + break;//家政首页默认菜单 + } + $this->renderSuccess('平台菜单信息' , $menudata); + } + /** + * Comment: 获取自定义装修页面配置信息 + * Author: zzw + */ + public function doPageHomePage(){ + global $_W , $_GPC; + #1、信息获取 + //页面类型:1=自定义页面;2=商城首页;3=抢购首页;4=团购首页;5=卡券首页;6=拼团首页;7=砍价首页;8=好店首页; + //13=名片首页;14=活动首页;15=招聘首页;16=相亲首页;18=家政首页 + $type = $_GPC['type'] ? $_GPC['type'] : 2; + $page_id = $_GPC['page_id'] ? $_GPC['page_id'] : 0;//页面的id + $_W['aid'] = $_GPC['aid'] ? : 0; + $settings = Setting::agentsetting_read('diypageset');//装修设置信息 + $titleList = [ + 1 => '自定义页面' , + 2 => '平台首页' , + 3 => '抢购首页' , + 4 => '团购首页' , + 5 => '卡券首页' , + 6 => '拼团首页' , + 7 => '砍价首页' , + 8 => '好店首页' , + 13 => '名片首页' , + 14 => '活动首页' , + 15 => '招聘首页' , + 16 => '相亲首页' , + 18 => '家政首页' , + ]; + //兼容自定义选择页面 + $oldType = $type; + if($page_id > 0 && $type != 1) $type = 1; + #2、根据type获取不同页面的配置信息 + switch ($type) { + case 1: + if (!$page_id) $this->renderError('缺少参数:页面id'); + #2、页面配置信息获取 + $pageset = Diy::getPage($page_id , true); + //其他信息获取 + $pageInfo = $pageset['data']['page'];//本页面标题信息 + $advId = $pageInfo['diyadv'];//广告id + //$menuId = $pageInfo['diymenu'];//菜单id + break;//自定义页面 + case 2: + //判断是否设置首页信息 未设置获取默认信息 + $id = $settings['page_index']; + if ($id > 0) $pageset = Diy::getPage($id , true); + else $pageset = DiyPage::getHomePageDefaultInfo(); + //其他信息获取 + $advId = $settings['adv_index'];//广告id + //$menuId = $settings['menu_index'];//菜单id + $pageInfo = $pageset['data']['page'];//本页面标题信息 + break;//商城首页 + case 3: + //判断是否设置首页信息 未设置获取默认信息 + $id = $settings['page_rush']; + if ($id > 0) $pageset = Diy::getPage($id , true); + if (!$pageset) $pageset = DiyPage::getRushPageDefaultInfo(); + //其他信息获取 + $advId = $settings['adv_rush'];//广告id + //$menuId = $settings['menu_rush'];//菜单id + $pageInfo = $pageset['data']['page'];//本页面标题信息 + break;//抢购首页 + case 4: + //判断是否设置首页信息 未设置获取默认信息 + $id = $settings['page_groupon']; + if ($id > 0) $pageset = Diy::getPage($id , true); + if (!$pageset) $pageset = DiyPage::getGroupPageDefaultInfo(); + //其他信息获取 + $advId = $settings['adv_groupon'];//广告id + //$menuId = $settings['menu_groupon'];//菜单id + $pageInfo = $pageset['data']['page'];//本页面标题信息 + break;//团购首页 + case 5: + //判断是否设置首页信息 未设置获取默认信息 + $id = $settings['page_wlcoupon']; + if ($id > 0) $pageset = Diy::getPage($id , true); + if (!$pageset) $pageset = DiyPage::getCouponPageDefaultInfo(); + //其他信息获取 + $advId = $settings['adv_wlcoupon'];//广告id + //$menuId = $settings['menu_wlcoupon'];//菜单id + $pageInfo = $pageset['data']['page'];//本页面标题信息 + break;//卡券首页 + case 6: + //判断是否设置首页信息 未设置获取默认信息 + $id = $settings['page_wlfightgroup']; + if ($id > 0) $pageset = Diy::getPage($id , true); + if (!$pageset) $pageset = DiyPage::getFightPageDefaultInfo(); + //其他信息获取 + $advId = $settings['adv_wlfightgroup'];//广告id + //$menuId = $settings['menu_wlfightgroup'];//菜单id + $pageInfo = $pageset['data']['page'];//本页面标题信息 + break;//拼团首页 + case 7: + //判断是否设置首页信息 未设置获取默认信息 + $id = $settings['page_bargain']; + if ($id > 0) $pageset = Diy::getPage($id , true); + if (!$pageset) $pageset = DiyPage::getBargainPageDefaultInfo(); + //其他信息获取 + $advId = $settings['adv_bargain'];//广告id + //$menuId = $settings['menu_bargain'];//菜单id + $pageInfo = $pageset['data']['page'];//本页面标题信息 + break;//砍价首页 + case 8: + //判断是否设置首页信息 未设置获取默认信息 + $id = $settings['page_shop']; + if ($id > 0) $pageset = Diy::getPage($id , true); + if (!$pageset) $pageset = DiyPage::getShopPageDefaultInfo(); + //其他信息获取 + //$menuId = $settings['menu_index'];//菜单id + $pageInfo = $pageset['data']['page'];//本页面标题信息 + break;//好店首页 + case 13: + //判断是否设置首页信息 未设置获取默认信息 + $id = $settings['page_card']; + if ($id > 0) $pageset = Diy::getPage($id , true); + if (!$pageset) $pageset = DiyPage::getCardPageDefaultInfo(); + //其他信息获取 + //$menuId = $settings['menu_card'];//菜单id + $pageInfo = $pageset['data']['page'];//本页面标题信息 + break;//名片首页 + case 14: + //判断是否设置信息 未设置获取默认信息 + $id = $settings['page_activity']; + if ($id > 0) $pageset = Diy::getPage($id , true); + if (!$pageset) $pageset = DiyPage::getActivityPageDefaultInfo(); + //其他信息获取 + $advId = $settings['adv_activity'];//广告id + //$menuId = $settings['menu_activity'];//菜单id + $pageInfo = $pageset['data']['page'];//本页面标题信息 + break;//活动首页 + case 15: + //判断是否设置信息 未设置获取默认信息 + $id = $settings['page_recruit']; + if ($id > 0) $pageset = Diy::getPage($id , true); + if (!$pageset) $pageset = DiyPage::getRecruitPageDefaultInfo(); + //其他信息获取 + $advId = $settings['adv_recruit'];//广告id + //$menuId = $settings['menu_recruit'];//菜单id + $pageInfo = $pageset['data']['page'];//本页面标题信息 + break;//招聘首页 + case 16: + //判断是否设置信息 未设置获取默认信息 + $id = $settings['page_dating']; + if ($id > 0) $pageset = Diy::getPage($id , true); + if (!$pageset) $pageset = DiyPage::getDatingPageDefaultInfo(); + //其他信息获取 + $advId = $settings['adv_dating'];//广告id + //$menuId = $settings['menu_dating'];//菜单id + $pageInfo = $pageset['data']['page'];//本页面标题信息 + break;//相亲首页 + case 18: + //判断是否设置信息 未设置获取默认信息 + $id = $settings['page_housekeep']; + if ($id > 0) $pageset = Diy::getPage($id , true); + if (!$pageset) $pageset = DiyPage::getHouseKeepPageDefaultInfo(); + //其他信息获取 + $advId = $settings['adv_housekeep'];//广告id + //$menuId = $settings['menu_housekeep'];//菜单id + $pageInfo = $pageset['data']['page'];//本页面标题信息 + break;//家政首页 + } + $type = $oldType; + #3、获取页面标题信息 + $page['music'] = $pageInfo['bgm_music'] ? tomedia($pageInfo['bgm_music']) : ''; + $page['title'] = $pageInfo['title'] ? : $_W['wlsetting']['base']['name']; + $page['background'] = $pageInfo['background'] ? : ''; + $page['share_title'] = $pageInfo['share_title'] ? : ''; + $page['share_description'] = $pageInfo['share_description'] ? : ''; + $page['share_image'] = tomedia($pageInfo['share_image']) ? : ''; + if($type == 2){ + $page['copytext'] = unserialize($_W['wlsetting']['base']['copytext']); + $page['copyurl'] = unserialize($_W['wlsetting']['base']['copyurl']); + } + //获取图片设置信息 + $page['imgstyle']['width'] = !empty(trim($_W['wlsetting']['base']['width'])) ? trim($_W['wlsetting']['base']['width']) : 750; + $page['imgstyle']['height'] = !empty(trim($_W['wlsetting']['base']['height'])) ? trim($_W['wlsetting']['base']['height']) : 560; + #4、根据id获取页面菜单信息、广告信息 + if ($advId > 0) $advdata = Diy::BeOverdue($advId , false)['data'];//广告配置信息获取 + #5、信息拼装 + $data['page'] = $page ? $page : [];//本页面配置信息 + $data['adv'] = $advdata ? $advdata : [];//广告配置信息 + //组件配置信息 + if (is_array($pageset['data']['items'])) { + foreach ($pageset['data']['items'] as $key => &$val) { + if ($val) $data['item'][$key] = $val; + } + }else { + $data['item'] = []; + } + if(p('redpack')){ + $data['page']['redpackflag'] = 1; + } + + $this->renderSuccess($titleList[$type] . '配置信息' , $data); + } + /** + * Comment: 获取装修页面基本配置信息 + * Author: zzw + */ + public function doPageNewHomePage(){ + global $_W , $_GPC; + //信息获取 + $type = $_GPC['type'] ? $_GPC['type'] : 2;//页面类型:1=自定义页面;2=商城首页;3=抢购首页;4=团购首页;5=卡券首页;6=拼团首页;7=砍价首页;8=好店首页;13=名片首页;14=活动首页;15=招聘首页 + $page_id = $_GPC['page_id'] ? $_GPC['page_id'] : 0;//页面的id + $_W['aid'] = $_GPC['aid'] ? : 0; + //兼容自定义选择页面 + if ($page_id > 0 && $type != 1) $type = 1; + if (!$page_id && $type == 1) $this->renderError('缺少参数:页面id'); + //根据type获取不同页面的配置信息 + [$advId,$pageInfo,$pageset] = Diy::getPageParams($type,$page_id); + //处理组件信息 + $items = $pageset['data']['items']; + $items = is_array($items) ? array_keys($items) : []; + //获取页面标题信息 + $page['music'] = $pageInfo['bgm_music'] ? tomedia($pageInfo['bgm_music']) : ''; + $page['title'] = $pageInfo['title'] ? : $_W['wlsetting']['base']['name']; + $page['background'] = $pageInfo['background'] ? : ''; + $page['share_title'] = $pageInfo['share_title'] ? : ''; + $page['share_description'] = $pageInfo['share_description'] ? : ''; + $page['share_image'] = tomedia($pageInfo['share_image']) ? : ''; + if($type == 2){ + $page['copytext'] = unserialize($_W['wlsetting']['base']['copytext']); + $page['copyurl'] = unserialize($_W['wlsetting']['base']['copyurl']); + } + //获取图片设置信息 + $page['imgstyle']['width'] = !empty(trim($_W['wlsetting']['base']['width'])) ? trim($_W['wlsetting']['base']['width']) : 750; + $page['imgstyle']['height'] = !empty(trim($_W['wlsetting']['base']['height'])) ? trim($_W['wlsetting']['base']['height']) : 560; + #4、根据id获取页面菜单信息、广告信息 + if ($advId > 0) $advdata = Diy::BeOverdue($advId , false)['data'];//广告配置信息获取 + #5、信息拼装 + $data['page'] = $page ? $page : [];//本页面配置信息 + $data['adv'] = $advdata ? $advdata : [];//广告配置信息 + $data['item'] = $items;//组件配置信息 + //判断是否存在红包插件 + if(p('redpack')) $data['page']['redpackflag'] = 1; + + $this->renderSuccess( '装修页面配置信息' , $data); + } + /** + * Comment: 获取某个组件的配置信息 + * Author: zzw + */ + public function doPageGetItemParams(){ + global $_W , $_GPC; + //信息获取 + $type = $_GPC['type'] ? $_GPC['type'] : 2;//页面类型:1=自定义页面;2=商城首页;3=抢购首页;4=团购首页;5=卡券首页;6=拼团首页;7=砍价首页;8=好店首页;13=名片首页;14=活动首页 + $page_id = $_GPC['page_id'] ? $_GPC['page_id'] : 0;//页面的id + $itemKey = $_GPC['item_key'] OR $this->renderError('不存在的组件!');//组件下标名称 + $_W['aid'] = $_GPC['aid'] ? : 0; + //兼容自定义选择页面 + if ($page_id > 0 && $type != 1) $type = 1; + if (!$page_id && $type == 1) $this->renderError('缺少参数:页面id'); + //根据type获取不同页面的配置信息 + [$advId,$pageInfo,$pageset] = Diy::getPageParams($type,$page_id); + $items = $pageset['data']['items']; + $info = Diy::handlePageItem($items[$itemKey]); + $this->renderSuccess( '组件配置信息' , $info); + } + /** + * Comment: 顶部关注接口 + * Author: wlf + */ + public function doPageTopFollow(){ + global $_W , $_GPC; + $url = $_GPC['url']; + $openid = pdo_getcolumn(PDO_NAME.'member',array('id'=>$_W['mid']),'openid'); + if(!empty($openid)){ + pdo_insert('wlmerchant_halfcard_qrscan', array('uniacid' => $_W['uniacid'],'type' => 'top' ,'openid' => $openid, 'scantime' => time(), 'url' => $url)); + } + $this->renderSuccess('OK'); + } + +} \ No newline at end of file diff --git a/addons/weliam_smartcity/vendor/symfony/event-dispatcher-contracts/Event.php b/addons/weliam_smartcity/vendor/symfony/event-dispatcher-contracts/Event.php new file mode 100644 index 0000000..84f60f3 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/event-dispatcher-contracts/Event.php @@ -0,0 +1,96 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Contracts\EventDispatcher; + +use Psr\EventDispatcher\StoppableEventInterface; + +if (interface_exists(StoppableEventInterface::class)) { + /** + * Event is the base class for classes containing event data. + * + * This class contains no event data. It is used by events that do not pass + * state information to an event handler when an event is raised. + * + * You can call the method stopPropagation() to abort the execution of + * further listeners in your event listener. + * + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author Bernhard Schussek + * @author Nicolas Grekas + */ + class Event implements StoppableEventInterface + { + private $propagationStopped = false; + + /** + * Returns whether further event listeners should be triggered. + */ + public function isPropagationStopped(): bool + { + return $this->propagationStopped; + } + + /** + * Stops the propagation of the event to further event listeners. + * + * If multiple event listeners are connected to the same event, no + * further event listener will be triggered once any trigger calls + * stopPropagation(). + */ + public function stopPropagation(): void + { + $this->propagationStopped = true; + } + } +} else { + /** + * Event is the base class for classes containing event data. + * + * This class contains no event data. It is used by events that do not pass + * state information to an event handler when an event is raised. + * + * You can call the method stopPropagation() to abort the execution of + * further listeners in your event listener. + * + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author Bernhard Schussek + * @author Nicolas Grekas + */ + class Event + { + private $propagationStopped = false; + + /** + * Returns whether further event listeners should be triggered. + */ + public function isPropagationStopped(): bool + { + return $this->propagationStopped; + } + + /** + * Stops the propagation of the event to further event listeners. + * + * If multiple event listeners are connected to the same event, no + * further event listener will be triggered once any trigger calls + * stopPropagation(). + */ + public function stopPropagation(): void + { + $this->propagationStopped = true; + } + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/event-dispatcher-contracts/EventDispatcherInterface.php b/addons/weliam_smartcity/vendor/symfony/event-dispatcher-contracts/EventDispatcherInterface.php new file mode 100644 index 0000000..2d470af --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/event-dispatcher-contracts/EventDispatcherInterface.php @@ -0,0 +1,58 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Contracts\EventDispatcher; + +use Psr\EventDispatcher\EventDispatcherInterface as PsrEventDispatcherInterface; + +if (interface_exists(PsrEventDispatcherInterface::class)) { + /** + * Allows providing hooks on domain-specific lifecycles by dispatching events. + */ + interface EventDispatcherInterface extends PsrEventDispatcherInterface + { + /** + * Dispatches an event to all registered listeners. + * + * For BC with Symfony 4, the $eventName argument is not declared explicitly on the + * signature of the method. Implementations that are not bound by this BC constraint + * MUST declare it explicitly, as allowed by PHP. + * + * @param object $event The event to pass to the event handlers/listeners + * @param string|null $eventName The name of the event to dispatch. If not supplied, + * the class of $event should be used instead. + * + * @return object The passed $event MUST be returned + */ + public function dispatch($event/*, string $eventName = null*/); + } +} else { + /** + * Allows providing hooks on domain-specific lifecycles by dispatching events. + */ + interface EventDispatcherInterface + { + /** + * Dispatches an event to all registered listeners. + * + * For BC with Symfony 4, the $eventName argument is not declared explicitly on the + * signature of the method. Implementations that are not bound by this BC constraint + * MUST declare it explicitly, as allowed by PHP. + * + * @param object $event The event to pass to the event handlers/listeners + * @param string|null $eventName The name of the event to dispatch. If not supplied, + * the class of $event should be used instead. + * + * @return object The passed $event MUST be returned + */ + public function dispatch($event/*, string $eventName = null*/); + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/event-dispatcher-contracts/LICENSE b/addons/weliam_smartcity/vendor/symfony/event-dispatcher-contracts/LICENSE new file mode 100644 index 0000000..3f853aa --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/event-dispatcher-contracts/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2018-2019 Fabien Potencier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/addons/weliam_smartcity/vendor/symfony/event-dispatcher-contracts/README.md b/addons/weliam_smartcity/vendor/symfony/event-dispatcher-contracts/README.md new file mode 100644 index 0000000..fb051c7 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/event-dispatcher-contracts/README.md @@ -0,0 +1,9 @@ +Symfony EventDispatcher Contracts +================================= + +A set of abstractions extracted out of the Symfony components. + +Can be used to build on semantics that the Symfony components proved useful - and +that already have battle tested implementations. + +See https://github.com/symfony/contracts/blob/master/README.md for more information. diff --git a/addons/weliam_smartcity/vendor/symfony/event-dispatcher-contracts/composer.json b/addons/weliam_smartcity/vendor/symfony/event-dispatcher-contracts/composer.json new file mode 100644 index 0000000..55802a4 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/event-dispatcher-contracts/composer.json @@ -0,0 +1,34 @@ +{ + "name": "symfony/event-dispatcher-contracts", + "type": "library", + "description": "Generic abstractions related to dispatching event", + "keywords": ["abstractions", "contracts", "decoupling", "interfaces", "interoperability", "standards"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": "^7.1.3" + }, + "suggest": { + "psr/event-dispatcher": "", + "symfony/event-dispatcher-implementation": "" + }, + "autoload": { + "psr-4": { "Symfony\\Contracts\\EventDispatcher\\": "" } + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/polyfill-intl-idn/Idn.php b/addons/weliam_smartcity/vendor/symfony/polyfill-intl-idn/Idn.php new file mode 100644 index 0000000..adb718d --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/polyfill-intl-idn/Idn.php @@ -0,0 +1,283 @@ + + * @author Sebastian Kroczek + * @author Dmitry Lukashin + * @author Laurent Bassin + * + * @internal + */ +final class Idn +{ + const INTL_IDNA_VARIANT_2003 = 0; + const INTL_IDNA_VARIANT_UTS46 = 1; + + private static $encodeTable = array( + 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', + 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', + 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + ); + + private static $decodeTable = array( + 'a' => 0, 'b' => 1, 'c' => 2, 'd' => 3, 'e' => 4, 'f' => 5, + 'g' => 6, 'h' => 7, 'i' => 8, 'j' => 9, 'k' => 10, 'l' => 11, + 'm' => 12, 'n' => 13, 'o' => 14, 'p' => 15, 'q' => 16, 'r' => 17, + 's' => 18, 't' => 19, 'u' => 20, 'v' => 21, 'w' => 22, 'x' => 23, + 'y' => 24, 'z' => 25, '0' => 26, '1' => 27, '2' => 28, '3' => 29, + '4' => 30, '5' => 31, '6' => 32, '7' => 33, '8' => 34, '9' => 35, + ); + + public static function idn_to_ascii($domain, $options, $variant, &$idna_info = array()) + { + if (\PHP_VERSION_ID >= 70200 && self::INTL_IDNA_VARIANT_2003 === $variant) { + @trigger_error('idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated', E_USER_DEPRECATED); + } + + if (self::INTL_IDNA_VARIANT_UTS46 === $variant) { + $domain = mb_strtolower($domain, 'utf-8'); + } + + $parts = explode('.', $domain); + + foreach ($parts as $i => &$part) { + if ('' === $part && \count($parts) > 1 + $i) { + return false; + } + if (false === $part = self::encodePart($part)) { + return false; + } + } + + $output = implode('.', $parts); + + $idna_info = array( + 'result' => \strlen($output) > 255 ? false : $output, + 'isTransitionalDifferent' => false, + 'errors' => 0, + ); + + return $idna_info['result']; + } + + public static function idn_to_utf8($domain, $options, $variant, &$idna_info = array()) + { + if (\PHP_VERSION_ID >= 70200 && self::INTL_IDNA_VARIANT_2003 === $variant) { + @trigger_error('idn_to_utf8(): INTL_IDNA_VARIANT_2003 is deprecated', E_USER_DEPRECATED); + } + + $parts = explode('.', $domain); + + foreach ($parts as &$part) { + $length = \strlen($part); + if ($length < 1 || 63 < $length) { + continue; + } + if (0 !== strpos($part, 'xn--')) { + continue; + } + + $part = substr($part, 4); + $part = self::decodePart($part); + } + + $output = implode('.', $parts); + + $idna_info = array( + 'result' => \strlen($output) > 255 ? false : $output, + 'isTransitionalDifferent' => false, + 'errors' => 0, + ); + + return $idna_info['result']; + } + + private static function encodePart($input) + { + $codePoints = self::listCodePoints($input); + + $n = 128; + $bias = 72; + $delta = 0; + $h = $b = \count($codePoints['basic']); + + $output = ''; + foreach ($codePoints['basic'] as $code) { + $output .= mb_chr($code, 'utf-8'); + } + if ($input === $output) { + return $output; + } + if ($b > 0) { + $output .= '-'; + } + + $codePoints['nonBasic'] = array_unique($codePoints['nonBasic']); + sort($codePoints['nonBasic']); + + $i = 0; + $length = mb_strlen($input, 'utf-8'); + while ($h < $length) { + $m = $codePoints['nonBasic'][$i++]; + $delta += ($m - $n) * ($h + 1); + $n = $m; + + foreach ($codePoints['all'] as $c) { + if ($c < $n || $c < 128) { + ++$delta; + } + if ($c === $n) { + $q = $delta; + for ($k = 36;; $k += 36) { + $t = self::calculateThreshold($k, $bias); + if ($q < $t) { + break; + } + + $code = $t + (($q - $t) % (36 - $t)); + $output .= self::$encodeTable[$code]; + + $q = ($q - $t) / (36 - $t); + } + + $output .= self::$encodeTable[$q]; + $bias = self::adapt($delta, $h + 1, ($h === $b)); + $delta = 0; + ++$h; + } + } + + ++$delta; + ++$n; + } + + $output = 'xn--'.$output; + + return \strlen($output) < 1 || 63 < \strlen($output) ? false : strtolower($output); + } + + private static function listCodePoints($input) + { + $codePoints = array( + 'all' => array(), + 'basic' => array(), + 'nonBasic' => array(), + ); + + $length = mb_strlen($input, 'utf-8'); + for ($i = 0; $i < $length; ++$i) { + $char = mb_substr($input, $i, 1, 'utf-8'); + $code = mb_ord($char, 'utf-8'); + if ($code < 128) { + $codePoints['all'][] = $codePoints['basic'][] = $code; + } else { + $codePoints['all'][] = $codePoints['nonBasic'][] = $code; + } + } + + return $codePoints; + } + + private static function calculateThreshold($k, $bias) + { + if ($k <= $bias + 1) { + return 1; + } + if ($k >= $bias + 26) { + return 26; + } + + return $k - $bias; + } + + private static function adapt($delta, $numPoints, $firstTime) + { + $delta = (int) ($firstTime ? $delta / 700 : $delta / 2); + $delta += (int) ($delta / $numPoints); + + $k = 0; + while ($delta > 35 * 13) { + $delta = (int) ($delta / 35); + $k = $k + 36; + } + + return $k + (int) (36 * $delta / ($delta + 38)); + } + + private static function decodePart($input) + { + $n = 128; + $i = 0; + $bias = 72; + $output = ''; + + $pos = strrpos($input, '-'); + if (false !== $pos) { + $output = substr($input, 0, $pos++); + } else { + $pos = 0; + } + + $outputLength = \strlen($output); + $inputLength = \strlen($input); + + while ($pos < $inputLength) { + $oldi = $i; + $w = 1; + + for ($k = 36;; $k += 36) { + $digit = self::$decodeTable[$input[$pos++]]; + $i += $digit * $w; + $t = self::calculateThreshold($k, $bias); + + if ($digit < $t) { + break; + } + + $w *= 36 - $t; + } + + $bias = self::adapt($i - $oldi, ++$outputLength, 0 === $oldi); + $n = $n + (int) ($i / $outputLength); + $i = $i % $outputLength; + $output = mb_substr($output, 0, $i, 'utf-8').mb_chr($n, 'utf-8').mb_substr($output, $i, $outputLength - 1, 'utf-8'); + + ++$i; + } + + return $output; + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/polyfill-intl-idn/LICENSE b/addons/weliam_smartcity/vendor/symfony/polyfill-intl-idn/LICENSE new file mode 100644 index 0000000..3f853aa --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/polyfill-intl-idn/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2018-2019 Fabien Potencier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/addons/weliam_smartcity/vendor/symfony/polyfill-intl-idn/README.md b/addons/weliam_smartcity/vendor/symfony/polyfill-intl-idn/README.md new file mode 100644 index 0000000..5fd8c6e --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/polyfill-intl-idn/README.md @@ -0,0 +1,12 @@ +Symfony Polyfill / Intl: Idn +============================ + +This component provides `idn_to_ascii` and `idn_to_utf8` functions to users who run php versions without the intl extension. + +More information can be found in the +[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). + +License +======= + +This library is released under the [MIT license](LICENSE). diff --git a/addons/weliam_smartcity/vendor/symfony/polyfill-intl-idn/bootstrap.php b/addons/weliam_smartcity/vendor/symfony/polyfill-intl-idn/bootstrap.php new file mode 100644 index 0000000..c6e3921 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/polyfill-intl-idn/bootstrap.php @@ -0,0 +1,59 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Intl\Idn as p; + +if (!function_exists('idn_to_ascii')) { + define('U_IDNA_PROHIBITED_ERROR', 66560); + define('U_IDNA_ERROR_START', 66560); + define('U_IDNA_UNASSIGNED_ERROR', 66561); + define('U_IDNA_CHECK_BIDI_ERROR', 66562); + define('U_IDNA_STD3_ASCII_RULES_ERROR', 66563); + define('U_IDNA_ACE_PREFIX_ERROR', 66564); + define('U_IDNA_VERIFICATION_ERROR', 66565); + define('U_IDNA_LABEL_TOO_LONG_ERROR', 66566); + define('U_IDNA_ZERO_LENGTH_LABEL_ERROR', 66567); + define('U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR', 66568); + define('U_IDNA_ERROR_LIMIT', 66569); + define('U_STRINGPREP_PROHIBITED_ERROR', 66560); + define('U_STRINGPREP_UNASSIGNED_ERROR', 66561); + define('U_STRINGPREP_CHECK_BIDI_ERROR', 66562); + define('IDNA_DEFAULT', 0); + define('IDNA_ALLOW_UNASSIGNED', 1); + define('IDNA_USE_STD3_RULES', 2); + define('IDNA_CHECK_BIDI', 4); + define('IDNA_CHECK_CONTEXTJ', 8); + define('IDNA_NONTRANSITIONAL_TO_ASCII', 16); + define('IDNA_NONTRANSITIONAL_TO_UNICODE', 32); + define('INTL_IDNA_VARIANT_2003', 0); + define('INTL_IDNA_VARIANT_UTS46', 1); + define('IDNA_ERROR_EMPTY_LABEL', 1); + define('IDNA_ERROR_LABEL_TOO_LONG', 2); + define('IDNA_ERROR_DOMAIN_NAME_TOO_LONG', 4); + define('IDNA_ERROR_LEADING_HYPHEN', 8); + define('IDNA_ERROR_TRAILING_HYPHEN', 16); + define('IDNA_ERROR_HYPHEN_3_4', 32); + define('IDNA_ERROR_LEADING_COMBINING_MARK', 64); + define('IDNA_ERROR_DISALLOWED', 128); + define('IDNA_ERROR_PUNYCODE', 256); + define('IDNA_ERROR_LABEL_HAS_DOT', 512); + define('IDNA_ERROR_INVALID_ACE_LABEL', 1024); + define('IDNA_ERROR_BIDI', 2048); + define('IDNA_ERROR_CONTEXTJ', 4096); + + if (PHP_VERSION_ID < 70400) { + function idn_to_ascii($domain, $options = IDNA_DEFAULT, $variant = INTL_IDNA_VARIANT_2003, &$idna_info = array()) { return p\Idn::idn_to_ascii($domain, $options, $variant, $idna_info); } + function idn_to_utf8($domain, $options = IDNA_DEFAULT, $variant = INTL_IDNA_VARIANT_2003, &$idna_info = array()) { return p\Idn::idn_to_utf8($domain, $options, $variant, $idna_info); } + } else { + function idn_to_ascii($domain, $options = IDNA_DEFAULT, $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = array()) { return p\Idn::idn_to_ascii($domain, $options, $variant, $idna_info); } + function idn_to_utf8($domain, $options = IDNA_DEFAULT, $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = array()) { return p\Idn::idn_to_utf8($domain, $options, $variant, $idna_info); } + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/polyfill-intl-idn/composer.json b/addons/weliam_smartcity/vendor/symfony/polyfill-intl-idn/composer.json new file mode 100644 index 0000000..d2e3f4b --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/polyfill-intl-idn/composer.json @@ -0,0 +1,36 @@ +{ + "name": "symfony/polyfill-intl-idn", + "type": "library", + "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", + "keywords": ["polyfill", "shim", "compatibility", "portable", "intl", "idn"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Laurent Bassin", + "email": "laurent@bassin.info" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.3.3", + "symfony/polyfill-mbstring": "^1.3", + "symfony/polyfill-php72": "^1.9" + }, + "autoload": { + "psr-4": { "Symfony\\Polyfill\\Intl\\Idn\\": "" }, + "files": [ "bootstrap.php" ] + }, + "suggest": { + "ext-intl": "For best performance" + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "1.12-dev" + } + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/polyfill-mbstring/LICENSE b/addons/weliam_smartcity/vendor/symfony/polyfill-mbstring/LICENSE new file mode 100644 index 0000000..4cd8bdd --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/polyfill-mbstring/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2015-2019 Fabien Potencier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/addons/weliam_smartcity/vendor/symfony/polyfill-mbstring/Mbstring.php b/addons/weliam_smartcity/vendor/symfony/polyfill-mbstring/Mbstring.php new file mode 100644 index 0000000..1fc4fee --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/polyfill-mbstring/Mbstring.php @@ -0,0 +1,829 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Mbstring; + +/** + * Partial mbstring implementation in PHP, iconv based, UTF-8 centric. + * + * Implemented: + * - mb_chr - Returns a specific character from its Unicode code point + * - mb_convert_encoding - Convert character encoding + * - mb_convert_variables - Convert character code in variable(s) + * - mb_decode_mimeheader - Decode string in MIME header field + * - mb_encode_mimeheader - Encode string for MIME header XXX NATIVE IMPLEMENTATION IS REALLY BUGGED + * - mb_decode_numericentity - Decode HTML numeric string reference to character + * - mb_encode_numericentity - Encode character to HTML numeric string reference + * - mb_convert_case - Perform case folding on a string + * - mb_detect_encoding - Detect character encoding + * - mb_get_info - Get internal settings of mbstring + * - mb_http_input - Detect HTTP input character encoding + * - mb_http_output - Set/Get HTTP output character encoding + * - mb_internal_encoding - Set/Get internal character encoding + * - mb_list_encodings - Returns an array of all supported encodings + * - mb_ord - Returns the Unicode code point of a character + * - mb_output_handler - Callback function converts character encoding in output buffer + * - mb_scrub - Replaces ill-formed byte sequences with substitute characters + * - mb_strlen - Get string length + * - mb_strpos - Find position of first occurrence of string in a string + * - mb_strrpos - Find position of last occurrence of a string in a string + * - mb_str_split - Convert a string to an array + * - mb_strtolower - Make a string lowercase + * - mb_strtoupper - Make a string uppercase + * - mb_substitute_character - Set/Get substitution character + * - mb_substr - Get part of string + * - mb_stripos - Finds position of first occurrence of a string within another, case insensitive + * - mb_stristr - Finds first occurrence of a string within another, case insensitive + * - mb_strrchr - Finds the last occurrence of a character in a string within another + * - mb_strrichr - Finds the last occurrence of a character in a string within another, case insensitive + * - mb_strripos - Finds position of last occurrence of a string within another, case insensitive + * - mb_strstr - Finds first occurrence of a string within another + * - mb_strwidth - Return width of string + * - mb_substr_count - Count the number of substring occurrences + * + * Not implemented: + * - mb_convert_kana - Convert "kana" one from another ("zen-kaku", "han-kaku" and more) + * - mb_ereg_* - Regular expression with multibyte support + * - mb_parse_str - Parse GET/POST/COOKIE data and set global variable + * - mb_preferred_mime_name - Get MIME charset string + * - mb_regex_encoding - Returns current encoding for multibyte regex as string + * - mb_regex_set_options - Set/Get the default options for mbregex functions + * - mb_send_mail - Send encoded mail + * - mb_split - Split multibyte string using regular expression + * - mb_strcut - Get part of string + * - mb_strimwidth - Get truncated string with specified width + * + * @author Nicolas Grekas + * + * @internal + */ +final class Mbstring +{ + const MB_CASE_FOLD = PHP_INT_MAX; + + private static $encodingList = array('ASCII', 'UTF-8'); + private static $language = 'neutral'; + private static $internalEncoding = 'UTF-8'; + private static $caseFold = array( + array('µ', 'ſ', "\xCD\x85", 'ς', "\xCF\x90", "\xCF\x91", "\xCF\x95", "\xCF\x96", "\xCF\xB0", "\xCF\xB1", "\xCF\xB5", "\xE1\xBA\x9B", "\xE1\xBE\xBE"), + array('μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', "\xE1\xB9\xA1", 'ι'), + ); + + public static function mb_convert_encoding($s, $toEncoding, $fromEncoding = null) + { + if (\is_array($fromEncoding) || false !== strpos($fromEncoding, ',')) { + $fromEncoding = self::mb_detect_encoding($s, $fromEncoding); + } else { + $fromEncoding = self::getEncoding($fromEncoding); + } + + $toEncoding = self::getEncoding($toEncoding); + + if ('BASE64' === $fromEncoding) { + $s = base64_decode($s); + $fromEncoding = $toEncoding; + } + + if ('BASE64' === $toEncoding) { + return base64_encode($s); + } + + if ('HTML-ENTITIES' === $toEncoding || 'HTML' === $toEncoding) { + if ('HTML-ENTITIES' === $fromEncoding || 'HTML' === $fromEncoding) { + $fromEncoding = 'Windows-1252'; + } + if ('UTF-8' !== $fromEncoding) { + $s = iconv($fromEncoding, 'UTF-8//IGNORE', $s); + } + + return preg_replace_callback('/[\x80-\xFF]+/', array(__CLASS__, 'html_encoding_callback'), $s); + } + + if ('HTML-ENTITIES' === $fromEncoding) { + $s = html_entity_decode($s, ENT_COMPAT, 'UTF-8'); + $fromEncoding = 'UTF-8'; + } + + return iconv($fromEncoding, $toEncoding.'//IGNORE', $s); + } + + public static function mb_convert_variables($toEncoding, $fromEncoding, &$a = null, &$b = null, &$c = null, &$d = null, &$e = null, &$f = null) + { + $vars = array(&$a, &$b, &$c, &$d, &$e, &$f); + + $ok = true; + array_walk_recursive($vars, function (&$v) use (&$ok, $toEncoding, $fromEncoding) { + if (false === $v = Mbstring::mb_convert_encoding($v, $toEncoding, $fromEncoding)) { + $ok = false; + } + }); + + return $ok ? $fromEncoding : false; + } + + public static function mb_decode_mimeheader($s) + { + return iconv_mime_decode($s, 2, self::$internalEncoding); + } + + public static function mb_encode_mimeheader($s, $charset = null, $transferEncoding = null, $linefeed = null, $indent = null) + { + trigger_error('mb_encode_mimeheader() is bugged. Please use iconv_mime_encode() instead', E_USER_WARNING); + } + + public static function mb_decode_numericentity($s, $convmap, $encoding = null) + { + if (null !== $s && !\is_scalar($s) && !(\is_object($s) && \method_exists($s, '__toString'))) { + trigger_error('mb_decode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', E_USER_WARNING); + + return null; + } + + if (!\is_array($convmap) || !$convmap) { + return false; + } + + if (null !== $encoding && !\is_scalar($encoding)) { + trigger_error('mb_decode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', E_USER_WARNING); + + return ''; // Instead of null (cf. mb_encode_numericentity). + } + + $s = (string) $s; + if ('' === $s) { + return ''; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding) { + $encoding = null; + if (!preg_match('//u', $s)) { + $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s); + } + } else { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + $cnt = floor(\count($convmap) / 4) * 4; + + for ($i = 0; $i < $cnt; $i += 4) { + // collector_decode_htmlnumericentity ignores $convmap[$i + 3] + $convmap[$i] += $convmap[$i + 2]; + $convmap[$i + 1] += $convmap[$i + 2]; + } + + $s = preg_replace_callback('/&#(?:0*([0-9]+)|x0*([0-9a-fA-F]+))(?!&);?/', function (array $m) use ($cnt, $convmap) { + $c = isset($m[2]) ? (int) hexdec($m[2]) : $m[1]; + for ($i = 0; $i < $cnt; $i += 4) { + if ($c >= $convmap[$i] && $c <= $convmap[$i + 1]) { + return Mbstring::mb_chr($c - $convmap[$i + 2]); + } + } + + return $m[0]; + }, $s); + + if (null === $encoding) { + return $s; + } + + return iconv('UTF-8', $encoding.'//IGNORE', $s); + } + + public static function mb_encode_numericentity($s, $convmap, $encoding = null, $is_hex = false) + { + if (null !== $s && !\is_scalar($s) && !(\is_object($s) && \method_exists($s, '__toString'))) { + trigger_error('mb_encode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', E_USER_WARNING); + + return null; + } + + if (!\is_array($convmap) || !$convmap) { + return false; + } + + if (null !== $encoding && !\is_scalar($encoding)) { + trigger_error('mb_encode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', E_USER_WARNING); + + return null; // Instead of '' (cf. mb_decode_numericentity). + } + + if (null !== $is_hex && !\is_scalar($is_hex)) { + trigger_error('mb_encode_numericentity() expects parameter 4 to be boolean, '.\gettype($s).' given', E_USER_WARNING); + + return null; + } + + $s = (string) $s; + if ('' === $s) { + return ''; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding) { + $encoding = null; + if (!preg_match('//u', $s)) { + $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s); + } + } else { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + static $ulenMask = array("\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4); + + $cnt = floor(\count($convmap) / 4) * 4; + $i = 0; + $len = \strlen($s); + $result = ''; + + while ($i < $len) { + $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"]; + $uchr = substr($s, $i, $ulen); + $i += $ulen; + $c = self::mb_ord($uchr); + + for ($j = 0; $j < $cnt; $j += 4) { + if ($c >= $convmap[$j] && $c <= $convmap[$j + 1]) { + $cOffset = ($c + $convmap[$j + 2]) & $convmap[$j + 3]; + $result .= $is_hex ? sprintf('&#x%X;', $cOffset) : '&#'.$cOffset.';'; + continue 2; + } + } + $result .= $uchr; + } + + if (null === $encoding) { + return $result; + } + + return iconv('UTF-8', $encoding.'//IGNORE', $result); + } + + public static function mb_convert_case($s, $mode, $encoding = null) + { + $s = (string) $s; + if ('' === $s) { + return ''; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding) { + $encoding = null; + if (!preg_match('//u', $s)) { + $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s); + } + } else { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + if (MB_CASE_TITLE == $mode) { + static $titleRegexp = null; + if (null === $titleRegexp) { + $titleRegexp = self::getData('titleCaseRegexp'); + } + $s = preg_replace_callback($titleRegexp, array(__CLASS__, 'title_case'), $s); + } else { + if (MB_CASE_UPPER == $mode) { + static $upper = null; + if (null === $upper) { + $upper = self::getData('upperCase'); + } + $map = $upper; + } else { + if (self::MB_CASE_FOLD === $mode) { + $s = str_replace(self::$caseFold[0], self::$caseFold[1], $s); + } + + static $lower = null; + if (null === $lower) { + $lower = self::getData('lowerCase'); + } + $map = $lower; + } + + static $ulenMask = array("\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4); + + $i = 0; + $len = \strlen($s); + + while ($i < $len) { + $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"]; + $uchr = substr($s, $i, $ulen); + $i += $ulen; + + if (isset($map[$uchr])) { + $uchr = $map[$uchr]; + $nlen = \strlen($uchr); + + if ($nlen == $ulen) { + $nlen = $i; + do { + $s[--$nlen] = $uchr[--$ulen]; + } while ($ulen); + } else { + $s = substr_replace($s, $uchr, $i - $ulen, $ulen); + $len += $nlen - $ulen; + $i += $nlen - $ulen; + } + } + } + } + + if (null === $encoding) { + return $s; + } + + return iconv('UTF-8', $encoding.'//IGNORE', $s); + } + + public static function mb_internal_encoding($encoding = null) + { + if (null === $encoding) { + return self::$internalEncoding; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding || false !== @iconv($encoding, $encoding, ' ')) { + self::$internalEncoding = $encoding; + + return true; + } + + return false; + } + + public static function mb_language($lang = null) + { + if (null === $lang) { + return self::$language; + } + + switch ($lang = strtolower($lang)) { + case 'uni': + case 'neutral': + self::$language = $lang; + + return true; + } + + return false; + } + + public static function mb_list_encodings() + { + return array('UTF-8'); + } + + public static function mb_encoding_aliases($encoding) + { + switch (strtoupper($encoding)) { + case 'UTF8': + case 'UTF-8': + return array('utf8'); + } + + return false; + } + + public static function mb_check_encoding($var = null, $encoding = null) + { + if (null === $encoding) { + if (null === $var) { + return false; + } + $encoding = self::$internalEncoding; + } + + return self::mb_detect_encoding($var, array($encoding)) || false !== @iconv($encoding, $encoding, $var); + } + + public static function mb_detect_encoding($str, $encodingList = null, $strict = false) + { + if (null === $encodingList) { + $encodingList = self::$encodingList; + } else { + if (!\is_array($encodingList)) { + $encodingList = array_map('trim', explode(',', $encodingList)); + } + $encodingList = array_map('strtoupper', $encodingList); + } + + foreach ($encodingList as $enc) { + switch ($enc) { + case 'ASCII': + if (!preg_match('/[\x80-\xFF]/', $str)) { + return $enc; + } + break; + + case 'UTF8': + case 'UTF-8': + if (preg_match('//u', $str)) { + return 'UTF-8'; + } + break; + + default: + if (0 === strncmp($enc, 'ISO-8859-', 9)) { + return $enc; + } + } + } + + return false; + } + + public static function mb_detect_order($encodingList = null) + { + if (null === $encodingList) { + return self::$encodingList; + } + + if (!\is_array($encodingList)) { + $encodingList = array_map('trim', explode(',', $encodingList)); + } + $encodingList = array_map('strtoupper', $encodingList); + + foreach ($encodingList as $enc) { + switch ($enc) { + default: + if (strncmp($enc, 'ISO-8859-', 9)) { + return false; + } + // no break + case 'ASCII': + case 'UTF8': + case 'UTF-8': + } + } + + self::$encodingList = $encodingList; + + return true; + } + + public static function mb_strlen($s, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return \strlen($s); + } + + return @iconv_strlen($s, $encoding); + } + + public static function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return strpos($haystack, $needle, $offset); + } + + $needle = (string) $needle; + if ('' === $needle) { + trigger_error(__METHOD__.': Empty delimiter', E_USER_WARNING); + + return false; + } + + return iconv_strpos($haystack, $needle, $offset, $encoding); + } + + public static function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return strrpos($haystack, $needle, $offset); + } + + if ($offset != (int) $offset) { + $offset = 0; + } elseif ($offset = (int) $offset) { + if ($offset < 0) { + $haystack = self::mb_substr($haystack, 0, $offset, $encoding); + $offset = 0; + } else { + $haystack = self::mb_substr($haystack, $offset, 2147483647, $encoding); + } + } + + $pos = iconv_strrpos($haystack, $needle, $encoding); + + return false !== $pos ? $offset + $pos : false; + } + + public static function mb_str_split($string, $split_length = 1, $encoding = null) + { + if (null !== $string && !\is_scalar($string) && !(\is_object($string) && \method_exists($string, '__toString'))) { + trigger_error('mb_str_split() expects parameter 1 to be string, '.\gettype($string).' given', E_USER_WARNING); + + return null; + } + + if ($split_length < 1) { + trigger_error('The length of each segment must be greater than zero', E_USER_WARNING); + + return false; + } + + if (null === $encoding) { + $encoding = mb_internal_encoding(); + } + + $result = array(); + $length = mb_strlen($string, $encoding); + + for ($i = 0; $i < $length; $i += $split_length) { + $result[] = mb_substr($string, $i, $split_length, $encoding); + } + + return $result; + } + + public static function mb_strtolower($s, $encoding = null) + { + return self::mb_convert_case($s, MB_CASE_LOWER, $encoding); + } + + public static function mb_strtoupper($s, $encoding = null) + { + return self::mb_convert_case($s, MB_CASE_UPPER, $encoding); + } + + public static function mb_substitute_character($c = null) + { + if (0 === strcasecmp($c, 'none')) { + return true; + } + + return null !== $c ? false : 'none'; + } + + public static function mb_substr($s, $start, $length = null, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return (string) substr($s, $start, null === $length ? 2147483647 : $length); + } + + if ($start < 0) { + $start = iconv_strlen($s, $encoding) + $start; + if ($start < 0) { + $start = 0; + } + } + + if (null === $length) { + $length = 2147483647; + } elseif ($length < 0) { + $length = iconv_strlen($s, $encoding) + $length - $start; + if ($length < 0) { + return ''; + } + } + + return (string) iconv_substr($s, $start, $length, $encoding); + } + + public static function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) + { + $haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding); + $needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding); + + return self::mb_strpos($haystack, $needle, $offset, $encoding); + } + + public static function mb_stristr($haystack, $needle, $part = false, $encoding = null) + { + $pos = self::mb_stripos($haystack, $needle, 0, $encoding); + + return self::getSubpart($pos, $part, $haystack, $encoding); + } + + public static function mb_strrchr($haystack, $needle, $part = false, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return strrchr($haystack, $needle, $part); + } + $needle = self::mb_substr($needle, 0, 1, $encoding); + $pos = iconv_strrpos($haystack, $needle, $encoding); + + return self::getSubpart($pos, $part, $haystack, $encoding); + } + + public static function mb_strrichr($haystack, $needle, $part = false, $encoding = null) + { + $needle = self::mb_substr($needle, 0, 1, $encoding); + $pos = self::mb_strripos($haystack, $needle, $encoding); + + return self::getSubpart($pos, $part, $haystack, $encoding); + } + + public static function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) + { + $haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding); + $needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding); + + return self::mb_strrpos($haystack, $needle, $offset, $encoding); + } + + public static function mb_strstr($haystack, $needle, $part = false, $encoding = null) + { + $pos = strpos($haystack, $needle); + if (false === $pos) { + return false; + } + if ($part) { + return substr($haystack, 0, $pos); + } + + return substr($haystack, $pos); + } + + public static function mb_get_info($type = 'all') + { + $info = array( + 'internal_encoding' => self::$internalEncoding, + 'http_output' => 'pass', + 'http_output_conv_mimetypes' => '^(text/|application/xhtml\+xml)', + 'func_overload' => 0, + 'func_overload_list' => 'no overload', + 'mail_charset' => 'UTF-8', + 'mail_header_encoding' => 'BASE64', + 'mail_body_encoding' => 'BASE64', + 'illegal_chars' => 0, + 'encoding_translation' => 'Off', + 'language' => self::$language, + 'detect_order' => self::$encodingList, + 'substitute_character' => 'none', + 'strict_detection' => 'Off', + ); + + if ('all' === $type) { + return $info; + } + if (isset($info[$type])) { + return $info[$type]; + } + + return false; + } + + public static function mb_http_input($type = '') + { + return false; + } + + public static function mb_http_output($encoding = null) + { + return null !== $encoding ? 'pass' === $encoding : 'pass'; + } + + public static function mb_strwidth($s, $encoding = null) + { + $encoding = self::getEncoding($encoding); + + if ('UTF-8' !== $encoding) { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + $s = preg_replace('/[\x{1100}-\x{115F}\x{2329}\x{232A}\x{2E80}-\x{303E}\x{3040}-\x{A4CF}\x{AC00}-\x{D7A3}\x{F900}-\x{FAFF}\x{FE10}-\x{FE19}\x{FE30}-\x{FE6F}\x{FF00}-\x{FF60}\x{FFE0}-\x{FFE6}\x{20000}-\x{2FFFD}\x{30000}-\x{3FFFD}]/u', '', $s, -1, $wide); + + return ($wide << 1) + iconv_strlen($s, 'UTF-8'); + } + + public static function mb_substr_count($haystack, $needle, $encoding = null) + { + return substr_count($haystack, $needle); + } + + public static function mb_output_handler($contents, $status) + { + return $contents; + } + + public static function mb_chr($code, $encoding = null) + { + if (0x80 > $code %= 0x200000) { + $s = \chr($code); + } elseif (0x800 > $code) { + $s = \chr(0xC0 | $code >> 6).\chr(0x80 | $code & 0x3F); + } elseif (0x10000 > $code) { + $s = \chr(0xE0 | $code >> 12).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); + } else { + $s = \chr(0xF0 | $code >> 18).\chr(0x80 | $code >> 12 & 0x3F).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); + } + + if ('UTF-8' !== $encoding = self::getEncoding($encoding)) { + $s = mb_convert_encoding($s, $encoding, 'UTF-8'); + } + + return $s; + } + + public static function mb_ord($s, $encoding = null) + { + if ('UTF-8' !== $encoding = self::getEncoding($encoding)) { + $s = mb_convert_encoding($s, 'UTF-8', $encoding); + } + + if (1 === \strlen($s)) { + return \ord($s); + } + + $code = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0; + if (0xF0 <= $code) { + return (($code - 0xF0) << 18) + (($s[2] - 0x80) << 12) + (($s[3] - 0x80) << 6) + $s[4] - 0x80; + } + if (0xE0 <= $code) { + return (($code - 0xE0) << 12) + (($s[2] - 0x80) << 6) + $s[3] - 0x80; + } + if (0xC0 <= $code) { + return (($code - 0xC0) << 6) + $s[2] - 0x80; + } + + return $code; + } + + private static function getSubpart($pos, $part, $haystack, $encoding) + { + if (false === $pos) { + return false; + } + if ($part) { + return self::mb_substr($haystack, 0, $pos, $encoding); + } + + return self::mb_substr($haystack, $pos, null, $encoding); + } + + private static function html_encoding_callback(array $m) + { + $i = 1; + $entities = ''; + $m = unpack('C*', htmlentities($m[0], ENT_COMPAT, 'UTF-8')); + + while (isset($m[$i])) { + if (0x80 > $m[$i]) { + $entities .= \chr($m[$i++]); + continue; + } + if (0xF0 <= $m[$i]) { + $c = (($m[$i++] - 0xF0) << 18) + (($m[$i++] - 0x80) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80; + } elseif (0xE0 <= $m[$i]) { + $c = (($m[$i++] - 0xE0) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80; + } else { + $c = (($m[$i++] - 0xC0) << 6) + $m[$i++] - 0x80; + } + + $entities .= '&#'.$c.';'; + } + + return $entities; + } + + private static function title_case(array $s) + { + return self::mb_convert_case($s[1], MB_CASE_UPPER, 'UTF-8').self::mb_convert_case($s[2], MB_CASE_LOWER, 'UTF-8'); + } + + private static function getData($file) + { + if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.php')) { + return require $file; + } + + return false; + } + + private static function getEncoding($encoding) + { + if (null === $encoding) { + return self::$internalEncoding; + } + + $encoding = strtoupper($encoding); + + if ('8BIT' === $encoding || 'BINARY' === $encoding) { + return 'CP850'; + } + if ('UTF8' === $encoding) { + return 'UTF-8'; + } + + return $encoding; + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/polyfill-mbstring/README.md b/addons/weliam_smartcity/vendor/symfony/polyfill-mbstring/README.md new file mode 100644 index 0000000..342e828 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/polyfill-mbstring/README.md @@ -0,0 +1,13 @@ +Symfony Polyfill / Mbstring +=========================== + +This component provides a partial, native PHP implementation for the +[Mbstring](http://php.net/mbstring) extension. + +More information can be found in the +[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). + +License +======= + +This library is released under the [MIT license](LICENSE). diff --git a/addons/weliam_smartcity/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php b/addons/weliam_smartcity/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php new file mode 100644 index 0000000..e6fbfa6 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php @@ -0,0 +1,1096 @@ + 'a', + 'B' => 'b', + 'C' => 'c', + 'D' => 'd', + 'E' => 'e', + 'F' => 'f', + 'G' => 'g', + 'H' => 'h', + 'I' => 'i', + 'J' => 'j', + 'K' => 'k', + 'L' => 'l', + 'M' => 'm', + 'N' => 'n', + 'O' => 'o', + 'P' => 'p', + 'Q' => 'q', + 'R' => 'r', + 'S' => 's', + 'T' => 't', + 'U' => 'u', + 'V' => 'v', + 'W' => 'w', + 'X' => 'x', + 'Y' => 'y', + 'Z' => 'z', + 'À' => 'à', + 'Á' => 'á', + 'Â' => 'â', + 'Ã' => 'ã', + 'Ä' => 'ä', + 'Å' => 'å', + 'Æ' => 'æ', + 'Ç' => 'ç', + 'È' => 'è', + 'É' => 'é', + 'Ê' => 'ê', + 'Ë' => 'ë', + 'Ì' => 'ì', + 'Í' => 'í', + 'Î' => 'î', + 'Ï' => 'ï', + 'Ð' => 'ð', + 'Ñ' => 'ñ', + 'Ò' => 'ò', + 'Ó' => 'ó', + 'Ô' => 'ô', + 'Õ' => 'õ', + 'Ö' => 'ö', + 'Ø' => 'ø', + 'Ù' => 'ù', + 'Ú' => 'ú', + 'Û' => 'û', + 'Ü' => 'ü', + 'Ý' => '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' => 'ρ', + 'Σ' => 'σ', + 'Τ' => 'τ', + 'Υ' => 'υ', + 'Φ' => 'φ', + 'Χ' => 'χ', + 'Ψ' => 'ψ', + 'Ω' => 'ω', + 'Ϊ' => 'ϊ', + 'Ϋ' => 'ϋ', + 'Ϗ' => 'ϗ', + 'Ϙ' => 'ϙ', + 'Ϛ' => 'ϛ', + 'Ϝ' => 'ϝ', + 'Ϟ' => 'ϟ', + 'Ϡ' => 'ϡ', + 'Ϣ' => 'ϣ', + 'Ϥ' => 'ϥ', + 'Ϧ' => 'ϧ', + 'Ϩ' => 'ϩ', + 'Ϫ' => 'ϫ', + 'Ϭ' => 'ϭ', + 'Ϯ' => 'ϯ', + 'ϴ' => 'θ', + 'Ϸ' => 'ϸ', + 'Ϲ' => 'ϲ', + 'Ϻ' => 'ϻ', + 'Ͻ' => 'ͻ', + 'Ͼ' => 'ͼ', + 'Ͽ' => 'ͽ', + 'Ѐ' => 'ѐ', + 'Ё' => 'ё', + 'Ђ' => 'ђ', + 'Ѓ' => 'ѓ', + 'Є' => 'є', + 'Ѕ' => 'ѕ', + 'І' => 'і', + 'Ї' => 'ї', + 'Ј' => 'ј', + 'Љ' => 'љ', + 'Њ' => 'њ', + 'Ћ' => 'ћ', + 'Ќ' => 'ќ', + 'Ѝ' => 'ѝ', + 'Ў' => 'ў', + 'Џ' => 'џ', + 'А' => 'а', + 'Б' => 'б', + 'В' => 'в', + 'Г' => 'г', + 'Д' => 'д', + 'Е' => 'е', + 'Ж' => 'ж', + 'З' => 'з', + 'И' => 'и', + 'Й' => 'й', + 'К' => 'к', + 'Л' => 'л', + 'М' => 'м', + 'Н' => 'н', + 'О' => 'о', + 'П' => 'п', + 'Р' => 'р', + 'С' => 'с', + 'Т' => 'т', + 'У' => 'у', + 'Ф' => 'ф', + 'Х' => 'х', + 'Ц' => 'ц', + 'Ч' => 'ч', + 'Ш' => 'ш', + 'Щ' => 'щ', + 'Ъ' => 'ъ', + 'Ы' => 'ы', + 'Ь' => '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', + 'Ջ' => 'ջ', + 'Ռ' => 'ռ', + 'Ս' => 'ս', + 'Վ' => 'վ', + 'Տ' => 'տ', + 'Ր' => 'ր', + 'Ց' => 'ց', + 'Ւ' => 'ւ', + 'Փ' => 'փ', + 'Ք' => 'ք', + 'Օ' => 'օ', + 'Ֆ' => 'ֆ', + 'Ⴀ' => 'ⴀ', + 'Ⴁ' => 'ⴁ', + 'Ⴂ' => 'ⴂ', + 'Ⴃ' => 'ⴃ', + 'Ⴄ' => 'ⴄ', + 'Ⴅ' => 'ⴅ', + 'Ⴆ' => 'ⴆ', + 'Ⴇ' => 'ⴇ', + 'Ⴈ' => 'ⴈ', + 'Ⴉ' => 'ⴉ', + 'Ⴊ' => 'ⴊ', + 'Ⴋ' => 'ⴋ', + 'Ⴌ' => 'ⴌ', + 'Ⴍ' => 'ⴍ', + 'Ⴎ' => 'ⴎ', + 'Ⴏ' => 'ⴏ', + 'Ⴐ' => 'ⴐ', + 'Ⴑ' => 'ⴑ', + 'Ⴒ' => 'ⴒ', + 'Ⴓ' => 'ⴓ', + 'Ⴔ' => 'ⴔ', + 'Ⴕ' => 'ⴕ', + 'Ⴖ' => 'ⴖ', + 'Ⴗ' => 'ⴗ', + 'Ⴘ' => 'ⴘ', + 'Ⴙ' => 'ⴙ', + 'Ⴚ' => 'ⴚ', + 'Ⴛ' => 'ⴛ', + 'Ⴜ' => 'ⴜ', + 'Ⴝ' => 'ⴝ', + 'Ⴞ' => 'ⴞ', + 'Ⴟ' => 'ⴟ', + 'Ⴠ' => 'ⴠ', + 'Ⴡ' => 'ⴡ', + 'Ⴢ' => 'ⴢ', + 'Ⴣ' => 'ⴣ', + 'Ⴤ' => 'ⴤ', + 'Ⴥ' => 'ⴥ', + 'Ⴧ' => 'ⴧ', + 'Ⴭ' => 'ⴭ', + 'Ḁ' => 'ḁ', + 'Ḃ' => 'ḃ', + 'Ḅ' => 'ḅ', + 'Ḇ' => 'ḇ', + 'Ḉ' => 'ḉ', + 'Ḋ' => 'ḋ', + 'Ḍ' => 'ḍ', + 'Ḏ' => 'ḏ', + 'Ḑ' => 'ḑ', + 'Ḓ' => 'ḓ', + 'Ḕ' => 'ḕ', + 'Ḗ' => 'ḗ', + 'Ḙ' => 'ḙ', + 'Ḛ' => 'ḛ', + 'Ḝ' => 'ḝ', + 'Ḟ' => 'ḟ', + 'Ḡ' => 'ḡ', + 'Ḣ' => 'ḣ', + 'Ḥ' => 'ḥ', + 'Ḧ' => 'ḧ', + 'Ḩ' => 'ḩ', + 'Ḫ' => 'ḫ', + 'Ḭ' => 'ḭ', + 'Ḯ' => 'ḯ', + 'Ḱ' => 'ḱ', + 'Ḳ' => 'ḳ', + 'Ḵ' => 'ḵ', + 'Ḷ' => 'ḷ', + 'Ḹ' => 'ḹ', + 'Ḻ' => 'ḻ', + 'Ḽ' => 'ḽ', + 'Ḿ' => 'ḿ', + 'Ṁ' => 'ṁ', + 'Ṃ' => 'ṃ', + 'Ṅ' => 'ṅ', + 'Ṇ' => 'ṇ', + 'Ṉ' => 'ṉ', + 'Ṋ' => 'ṋ', + 'Ṍ' => 'ṍ', + 'Ṏ' => 'ṏ', + 'Ṑ' => 'ṑ', + 'Ṓ' => 'ṓ', + 'Ṕ' => 'ṕ', + 'Ṗ' => 'ṗ', + 'Ṙ' => 'ṙ', + 'Ṛ' => 'ṛ', + 'Ṝ' => 'ṝ', + 'Ṟ' => 'ṟ', + 'Ṡ' => 'ṡ', + 'Ṣ' => 'ṣ', + 'Ṥ' => 'ṥ', + 'Ṧ' => 'ṧ', + 'Ṩ' => 'ṩ', + 'Ṫ' => 'ṫ', + 'Ṭ' => 'ṭ', + 'Ṯ' => 'ṯ', + 'Ṱ' => 'ṱ', + 'Ṳ' => 'ṳ', + 'Ṵ' => 'ṵ', + 'Ṷ' => 'ṷ', + 'Ṹ' => 'ṹ', + 'Ṻ' => 'ṻ', + 'Ṽ' => 'ṽ', + 'Ṿ' => 'ṿ', + 'Ẁ' => 'ẁ', + 'Ẃ' => 'ẃ', + 'Ẅ' => 'ẅ', + 'Ẇ' => 'ẇ', + 'Ẉ' => 'ẉ', + 'Ẋ' => 'ẋ', + 'Ẍ' => 'ẍ', + 'Ẏ' => 'ẏ', + 'Ẑ' => 'ẑ', + 'Ẓ' => 'ẓ', + 'Ẕ' => 'ẕ', + 'ẞ' => 'ß', + 'Ạ' => 'ạ', + 'Ả' => 'ả', + 'Ấ' => 'ấ', + 'Ầ' => 'ầ', + 'Ẩ' => 'ẩ', + 'Ẫ' => 'ẫ', + 'Ậ' => 'ậ', + 'Ắ' => 'ắ', + 'Ằ' => 'ằ', + 'Ẳ' => 'ẳ', + 'Ẵ' => 'ẵ', + 'Ặ' => 'ặ', + 'Ẹ' => 'ẹ', + 'Ẻ' => 'ẻ', + 'Ẽ' => 'ẽ', + 'Ế' => 'ế', + 'Ề' => 'ề', + 'Ể' => 'ể', + 'Ễ' => 'ễ', + 'Ệ' => 'ệ', + 'Ỉ' => 'ỉ', + 'Ị' => 'ị', + 'Ọ' => 'ọ', + 'Ỏ' => 'ỏ', + 'Ố' => 'ố', + 'Ồ' => 'ồ', + 'Ổ' => 'ổ', + 'Ỗ' => 'ỗ', + 'Ộ' => 'ộ', + 'Ớ' => 'ớ', + 'Ờ' => 'ờ', + 'Ở' => 'ở', + 'Ỡ' => 'ỡ', + 'Ợ' => 'ợ', + 'Ụ' => 'ụ', + 'Ủ' => 'ủ', + 'Ứ' => 'ứ', + 'Ừ' => 'ừ', + 'Ử' => 'ử', + 'Ữ' => 'ữ', + 'Ự' => 'ự', + 'Ỳ' => 'ỳ', + 'Ỵ' => 'ỵ', + 'Ỷ' => 'ỷ', + 'Ỹ' => 'ỹ', + 'Ỻ' => 'ỻ', + 'Ỽ' => 'ỽ', + 'Ỿ' => 'ỿ', + 'Ἀ' => 'ἀ', + 'Ἁ' => 'ἁ', + 'Ἂ' => 'ἂ', + 'Ἃ' => 'ἃ', + 'Ἄ' => 'ἄ', + 'Ἅ' => 'ἅ', + 'Ἆ' => 'ἆ', + 'Ἇ' => 'ἇ', + 'Ἐ' => 'ἐ', + 'Ἑ' => 'ἑ', + 'Ἒ' => 'ἒ', + 'Ἓ' => 'ἓ', + 'Ἔ' => 'ἔ', + 'Ἕ' => 'ἕ', + 'Ἠ' => 'ἠ', + 'Ἡ' => 'ἡ', + 'Ἢ' => 'ἢ', + 'Ἣ' => 'ἣ', + 'Ἤ' => 'ἤ', + 'Ἥ' => 'ἥ', + 'Ἦ' => 'ἦ', + 'Ἧ' => 'ἧ', + 'Ἰ' => 'ἰ', + 'Ἱ' => 'ἱ', + 'Ἲ' => 'ἲ', + 'Ἳ' => 'ἳ', + 'Ἴ' => 'ἴ', + 'Ἵ' => 'ἵ', + 'Ἶ' => 'ἶ', + 'Ἷ' => 'ἷ', + 'Ὀ' => 'ὀ', + 'Ὁ' => 'ὁ', + 'Ὂ' => 'ὂ', + 'Ὃ' => 'ὃ', + 'Ὄ' => 'ὄ', + 'Ὅ' => 'ὅ', + 'Ὑ' => 'ὑ', + 'Ὓ' => 'ὓ', + 'Ὕ' => 'ὕ', + 'Ὗ' => 'ὗ', + 'Ὠ' => 'ὠ', + 'Ὡ' => 'ὡ', + 'Ὢ' => 'ὢ', + 'Ὣ' => 'ὣ', + 'Ὤ' => 'ὤ', + 'Ὥ' => 'ὥ', + 'Ὦ' => 'ὦ', + 'Ὧ' => 'ὧ', + 'ᾈ' => 'ᾀ', + 'ᾉ' => 'ᾁ', + 'ᾊ' => 'ᾂ', + 'ᾋ' => 'ᾃ', + 'ᾌ' => 'ᾄ', + 'ᾍ' => 'ᾅ', + 'ᾎ' => 'ᾆ', + 'ᾏ' => 'ᾇ', + 'ᾘ' => 'ᾐ', + 'ᾙ' => 'ᾑ', + 'ᾚ' => 'ᾒ', + 'ᾛ' => 'ᾓ', + 'ᾜ' => 'ᾔ', + 'ᾝ' => 'ᾕ', + 'ᾞ' => 'ᾖ', + 'ᾟ' => 'ᾗ', + 'ᾨ' => 'ᾠ', + 'ᾩ' => 'ᾡ', + 'ᾪ' => 'ᾢ', + 'ᾫ' => 'ᾣ', + 'ᾬ' => 'ᾤ', + 'ᾭ' => 'ᾥ', + 'ᾮ' => 'ᾦ', + 'ᾯ' => 'ᾧ', + 'Ᾰ' => 'ᾰ', + 'Ᾱ' => 'ᾱ', + 'Ὰ' => 'ὰ', + 'Ά' => 'ά', + 'ᾼ' => 'ᾳ', + 'Ὲ' => 'ὲ', + 'Έ' => 'έ', + 'Ὴ' => 'ὴ', + 'Ή' => 'ή', + 'ῌ' => 'ῃ', + 'Ῐ' => 'ῐ', + 'Ῑ' => 'ῑ', + 'Ὶ' => 'ὶ', + 'Ί' => 'ί', + 'Ῠ' => 'ῠ', + 'Ῡ' => 'ῡ', + 'Ὺ' => 'ὺ', + 'Ύ' => 'ύ', + 'Ῥ' => 'ῥ', + 'Ὸ' => 'ὸ', + 'Ό' => 'ό', + 'Ὼ' => 'ὼ', + 'Ώ' => 'ώ', + 'ῼ' => 'ῳ', + 'Ω' => 'ω', + 'K' => 'k', + 'Å' => 'å', + 'Ⅎ' => 'ⅎ', + 'Ⅰ' => 'ⅰ', + 'Ⅱ' => 'ⅱ', + 'Ⅲ' => 'ⅲ', + 'Ⅳ' => 'ⅳ', + 'Ⅴ' => 'ⅴ', + 'Ⅵ' => 'ⅵ', + 'Ⅶ' => 'ⅶ', + 'Ⅷ' => 'ⅷ', + 'Ⅸ' => 'ⅸ', + 'Ⅹ' => 'ⅹ', + 'Ⅺ' => 'ⅺ', + 'Ⅻ' => 'ⅻ', + 'Ⅼ' => 'ⅼ', + 'Ⅽ' => 'ⅽ', + 'Ⅾ' => 'ⅾ', + 'Ⅿ' => 'ⅿ', + 'Ↄ' => 'ↄ', + 'Ⓐ' => 'ⓐ', + 'Ⓑ' => 'ⓑ', + 'Ⓒ' => 'ⓒ', + 'Ⓓ' => 'ⓓ', + 'Ⓔ' => 'ⓔ', + 'Ⓕ' => 'ⓕ', + 'Ⓖ' => 'ⓖ', + 'Ⓗ' => 'ⓗ', + 'Ⓘ' => 'ⓘ', + 'Ⓙ' => 'ⓙ', + 'Ⓚ' => 'ⓚ', + 'Ⓛ' => 'ⓛ', + 'Ⓜ' => 'ⓜ', + 'Ⓝ' => 'ⓝ', + 'Ⓞ' => 'ⓞ', + 'Ⓟ' => 'ⓟ', + 'Ⓠ' => 'ⓠ', + 'Ⓡ' => 'ⓡ', + 'Ⓢ' => 'ⓢ', + 'Ⓣ' => 'ⓣ', + 'Ⓤ' => 'ⓤ', + 'Ⓥ' => 'ⓥ', + 'Ⓦ' => 'ⓦ', + 'Ⓧ' => 'ⓧ', + 'Ⓨ' => 'ⓨ', + 'Ⓩ' => 'ⓩ', + 'Ⰰ' => 'ⰰ', + 'Ⰱ' => 'ⰱ', + 'Ⰲ' => 'ⰲ', + 'Ⰳ' => 'ⰳ', + 'Ⰴ' => 'ⰴ', + 'Ⰵ' => 'ⰵ', + 'Ⰶ' => 'ⰶ', + 'Ⰷ' => 'ⰷ', + 'Ⰸ' => 'ⰸ', + 'Ⰹ' => 'ⰹ', + 'Ⰺ' => 'ⰺ', + 'Ⰻ' => 'ⰻ', + 'Ⰼ' => 'ⰼ', + 'Ⰽ' => 'ⰽ', + 'Ⰾ' => 'ⰾ', + 'Ⰿ' => 'ⰿ', + 'Ⱀ' => 'ⱀ', + 'Ⱁ' => 'ⱁ', + 'Ⱂ' => 'ⱂ', + 'Ⱃ' => 'ⱃ', + 'Ⱄ' => 'ⱄ', + 'Ⱅ' => 'ⱅ', + 'Ⱆ' => 'ⱆ', + 'Ⱇ' => 'ⱇ', + 'Ⱈ' => 'ⱈ', + 'Ⱉ' => 'ⱉ', + 'Ⱊ' => 'ⱊ', + 'Ⱋ' => 'ⱋ', + 'Ⱌ' => 'ⱌ', + 'Ⱍ' => 'ⱍ', + 'Ⱎ' => 'ⱎ', + 'Ⱏ' => 'ⱏ', + 'Ⱐ' => 'ⱐ', + 'Ⱑ' => 'ⱑ', + 'Ⱒ' => 'ⱒ', + 'Ⱓ' => 'ⱓ', + 'Ⱔ' => 'ⱔ', + 'Ⱕ' => 'ⱕ', + 'Ⱖ' => 'ⱖ', + 'Ⱗ' => 'ⱗ', + 'Ⱘ' => 'ⱘ', + 'Ⱙ' => 'ⱙ', + 'Ⱚ' => 'ⱚ', + 'Ⱛ' => 'ⱛ', + 'Ⱜ' => 'ⱜ', + 'Ⱝ' => 'ⱝ', + 'Ⱞ' => 'ⱞ', + 'Ⱡ' => 'ⱡ', + 'Ɫ' => 'ɫ', + 'Ᵽ' => 'ᵽ', + 'Ɽ' => 'ɽ', + 'Ⱨ' => 'ⱨ', + 'Ⱪ' => 'ⱪ', + 'Ⱬ' => 'ⱬ', + 'Ɑ' => 'ɑ', + 'Ɱ' => 'ɱ', + 'Ɐ' => 'ɐ', + 'Ɒ' => 'ɒ', + 'Ⱳ' => 'ⱳ', + 'Ⱶ' => 'ⱶ', + 'Ȿ' => 'ȿ', + 'Ɀ' => 'ɀ', + 'Ⲁ' => 'ⲁ', + 'Ⲃ' => 'ⲃ', + 'Ⲅ' => 'ⲅ', + 'Ⲇ' => 'ⲇ', + 'Ⲉ' => 'ⲉ', + 'Ⲋ' => 'ⲋ', + 'Ⲍ' => 'ⲍ', + 'Ⲏ' => 'ⲏ', + 'Ⲑ' => 'ⲑ', + 'Ⲓ' => 'ⲓ', + 'Ⲕ' => 'ⲕ', + 'Ⲗ' => 'ⲗ', + 'Ⲙ' => 'ⲙ', + 'Ⲛ' => 'ⲛ', + 'Ⲝ' => 'ⲝ', + 'Ⲟ' => 'ⲟ', + 'Ⲡ' => 'ⲡ', + 'Ⲣ' => 'ⲣ', + 'Ⲥ' => 'ⲥ', + 'Ⲧ' => 'ⲧ', + 'Ⲩ' => 'ⲩ', + 'Ⲫ' => 'ⲫ', + 'Ⲭ' => 'ⲭ', + 'Ⲯ' => 'ⲯ', + 'Ⲱ' => 'ⲱ', + 'Ⲳ' => 'ⲳ', + 'Ⲵ' => 'ⲵ', + 'Ⲷ' => 'ⲷ', + 'Ⲹ' => 'ⲹ', + 'Ⲻ' => 'ⲻ', + 'Ⲽ' => 'ⲽ', + 'Ⲿ' => 'ⲿ', + 'Ⳁ' => 'ⳁ', + 'Ⳃ' => 'ⳃ', + 'Ⳅ' => 'ⳅ', + 'Ⳇ' => 'ⳇ', + 'Ⳉ' => 'ⳉ', + 'Ⳋ' => 'ⳋ', + 'Ⳍ' => 'ⳍ', + 'Ⳏ' => 'ⳏ', + 'Ⳑ' => 'ⳑ', + 'Ⳓ' => 'ⳓ', + 'Ⳕ' => 'ⳕ', + 'Ⳗ' => 'ⳗ', + 'Ⳙ' => 'ⳙ', + 'Ⳛ' => 'ⳛ', + 'Ⳝ' => 'ⳝ', + 'Ⳟ' => 'ⳟ', + 'Ⳡ' => 'ⳡ', + 'Ⳣ' => 'ⳣ', + 'Ⳬ' => 'ⳬ', + 'Ⳮ' => 'ⳮ', + 'Ⳳ' => 'ⳳ', + 'Ꙁ' => 'ꙁ', + 'Ꙃ' => 'ꙃ', + 'Ꙅ' => 'ꙅ', + 'Ꙇ' => 'ꙇ', + 'Ꙉ' => 'ꙉ', + 'Ꙋ' => 'ꙋ', + 'Ꙍ' => 'ꙍ', + 'Ꙏ' => 'ꙏ', + 'Ꙑ' => 'ꙑ', + 'Ꙓ' => 'ꙓ', + 'Ꙕ' => 'ꙕ', + 'Ꙗ' => 'ꙗ', + 'Ꙙ' => 'ꙙ', + 'Ꙛ' => 'ꙛ', + 'Ꙝ' => 'ꙝ', + 'Ꙟ' => 'ꙟ', + 'Ꙡ' => 'ꙡ', + 'Ꙣ' => 'ꙣ', + 'Ꙥ' => 'ꙥ', + 'Ꙧ' => 'ꙧ', + 'Ꙩ' => 'ꙩ', + 'Ꙫ' => 'ꙫ', + 'Ꙭ' => 'ꙭ', + 'Ꚁ' => 'ꚁ', + 'Ꚃ' => 'ꚃ', + 'Ꚅ' => 'ꚅ', + 'Ꚇ' => 'ꚇ', + 'Ꚉ' => 'ꚉ', + 'Ꚋ' => 'ꚋ', + 'Ꚍ' => 'ꚍ', + 'Ꚏ' => 'ꚏ', + 'Ꚑ' => 'ꚑ', + 'Ꚓ' => 'ꚓ', + 'Ꚕ' => 'ꚕ', + 'Ꚗ' => 'ꚗ', + 'Ꚙ' => 'ꚙ', + 'Ꚛ' => 'ꚛ', + 'Ꜣ' => 'ꜣ', + 'Ꜥ' => 'ꜥ', + 'Ꜧ' => 'ꜧ', + 'Ꜩ' => 'ꜩ', + 'Ꜫ' => 'ꜫ', + 'Ꜭ' => 'ꜭ', + 'Ꜯ' => 'ꜯ', + 'Ꜳ' => 'ꜳ', + 'Ꜵ' => 'ꜵ', + 'Ꜷ' => 'ꜷ', + 'Ꜹ' => 'ꜹ', + 'Ꜻ' => 'ꜻ', + 'Ꜽ' => 'ꜽ', + 'Ꜿ' => 'ꜿ', + 'Ꝁ' => 'ꝁ', + 'Ꝃ' => 'ꝃ', + 'Ꝅ' => 'ꝅ', + 'Ꝇ' => 'ꝇ', + 'Ꝉ' => 'ꝉ', + 'Ꝋ' => 'ꝋ', + 'Ꝍ' => 'ꝍ', + 'Ꝏ' => 'ꝏ', + 'Ꝑ' => 'ꝑ', + 'Ꝓ' => 'ꝓ', + 'Ꝕ' => 'ꝕ', + 'Ꝗ' => 'ꝗ', + 'Ꝙ' => 'ꝙ', + 'Ꝛ' => 'ꝛ', + 'Ꝝ' => 'ꝝ', + 'Ꝟ' => 'ꝟ', + 'Ꝡ' => 'ꝡ', + 'Ꝣ' => 'ꝣ', + 'Ꝥ' => 'ꝥ', + 'Ꝧ' => 'ꝧ', + 'Ꝩ' => 'ꝩ', + 'Ꝫ' => 'ꝫ', + 'Ꝭ' => 'ꝭ', + 'Ꝯ' => 'ꝯ', + 'Ꝺ' => 'ꝺ', + 'Ꝼ' => 'ꝼ', + 'Ᵹ' => 'ᵹ', + 'Ꝿ' => 'ꝿ', + 'Ꞁ' => 'ꞁ', + 'Ꞃ' => 'ꞃ', + 'Ꞅ' => 'ꞅ', + 'Ꞇ' => 'ꞇ', + 'Ꞌ' => 'ꞌ', + 'Ɥ' => 'ɥ', + 'Ꞑ' => 'ꞑ', + 'Ꞓ' => 'ꞓ', + 'Ꞗ' => 'ꞗ', + 'Ꞙ' => 'ꞙ', + 'Ꞛ' => 'ꞛ', + 'Ꞝ' => 'ꞝ', + 'Ꞟ' => 'ꞟ', + 'Ꞡ' => 'ꞡ', + 'Ꞣ' => 'ꞣ', + 'Ꞥ' => 'ꞥ', + 'Ꞧ' => 'ꞧ', + 'Ꞩ' => 'ꞩ', + 'Ɦ' => 'ɦ', + 'Ɜ' => 'ɜ', + 'Ɡ' => 'ɡ', + 'Ɬ' => 'ɬ', + 'Ʞ' => 'ʞ', + 'Ʇ' => 'ʇ', + 'A' => 'a', + 'B' => 'b', + 'C' => 'c', + 'D' => 'd', + 'E' => 'e', + 'F' => 'f', + 'G' => 'g', + 'H' => 'h', + 'I' => 'i', + 'J' => 'j', + 'K' => 'k', + 'L' => 'l', + 'M' => 'm', + 'N' => 'n', + 'O' => 'o', + 'P' => 'p', + 'Q' => 'q', + 'R' => 'r', + 'S' => 's', + 'T' => 't', + 'U' => 'u', + 'V' => 'v', + 'W' => 'w', + 'X' => 'x', + 'Y' => 'y', + 'Z' => 'z', + '𐐀' => '𐐨', + '𐐁' => '𐐩', + '𐐂' => '𐐪', + '𐐃' => '𐐫', + '𐐄' => '𐐬', + '𐐅' => '𐐭', + '𐐆' => '𐐮', + '𐐇' => '𐐯', + '𐐈' => '𐐰', + '𐐉' => '𐐱', + '𐐊' => '𐐲', + '𐐋' => '𐐳', + '𐐌' => '𐐴', + '𐐍' => '𐐵', + '𐐎' => '𐐶', + '𐐏' => '𐐷', + '𐐐' => '𐐸', + '𐐑' => '𐐹', + '𐐒' => '𐐺', + '𐐓' => '𐐻', + '𐐔' => '𐐼', + '𐐕' => '𐐽', + '𐐖' => '𐐾', + '𐐗' => '𐐿', + '𐐘' => '𐑀', + '𐐙' => '𐑁', + '𐐚' => '𐑂', + '𐐛' => '𐑃', + '𐐜' => '𐑄', + '𐐝' => '𐑅', + '𐐞' => '𐑆', + '𐐟' => '𐑇', + '𐐠' => '𐑈', + '𐐡' => '𐑉', + '𐐢' => '𐑊', + '𐐣' => '𐑋', + '𐐤' => '𐑌', + '𐐥' => '𐑍', + '𐐦' => '𐑎', + '𐐧' => '𐑏', + '𑢠' => '𑣀', + '𑢡' => '𑣁', + '𑢢' => '𑣂', + '𑢣' => '𑣃', + '𑢤' => '𑣄', + '𑢥' => '𑣅', + '𑢦' => '𑣆', + '𑢧' => '𑣇', + '𑢨' => '𑣈', + '𑢩' => '𑣉', + '𑢪' => '𑣊', + '𑢫' => '𑣋', + '𑢬' => '𑣌', + '𑢭' => '𑣍', + '𑢮' => '𑣎', + '𑢯' => '𑣏', + '𑢰' => '𑣐', + '𑢱' => '𑣑', + '𑢲' => '𑣒', + '𑢳' => '𑣓', + '𑢴' => '𑣔', + '𑢵' => '𑣕', + '𑢶' => '𑣖', + '𑢷' => '𑣗', + '𑢸' => '𑣘', + '𑢹' => '𑣙', + '𑢺' => '𑣚', + '𑢻' => '𑣛', + '𑢼' => '𑣜', + '𑢽' => '𑣝', + '𑢾' => '𑣞', + '𑢿' => '𑣟', +); diff --git a/addons/weliam_smartcity/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php b/addons/weliam_smartcity/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php new file mode 100644 index 0000000..2a8f6e7 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php @@ -0,0 +1,5 @@ + 'A', + 'b' => 'B', + 'c' => 'C', + 'd' => 'D', + 'e' => 'E', + 'f' => 'F', + 'g' => 'G', + 'h' => 'H', + 'i' => 'I', + 'j' => 'J', + 'k' => 'K', + 'l' => 'L', + 'm' => 'M', + 'n' => 'N', + 'o' => 'O', + 'p' => 'P', + 'q' => 'Q', + 'r' => 'R', + 's' => 'S', + 't' => 'T', + 'u' => 'U', + 'v' => 'V', + 'w' => 'W', + 'x' => 'X', + 'y' => 'Y', + 'z' => 'Z', + 'µ' => 'Μ', + 'à' => 'À', + 'á' => 'Á', + 'â' => 'Â', + 'ã' => 'Ã', + 'ä' => 'Ä', + 'å' => 'Å', + 'æ' => 'Æ', + 'ç' => 'Ç', + 'è' => 'È', + 'é' => 'É', + 'ê' => 'Ê', + 'ë' => 'Ë', + 'ì' => 'Ì', + 'í' => 'Í', + 'î' => 'Î', + 'ï' => 'Ï', + 'ð' => 'Ð', + 'ñ' => 'Ñ', + 'ò' => 'Ò', + 'ó' => 'Ó', + 'ô' => 'Ô', + 'õ' => 'Õ', + 'ö' => 'Ö', + 'ø' => 'Ø', + 'ù' => 'Ù', + 'ú' => 'Ú', + 'û' => 'Û', + 'ü' => 'Ü', + 'ý' => 'Ý', + 'þ' => 'Þ', + 'ÿ' => 'Ÿ', + 'ā' => 'Ā', + 'ă' => 'Ă', + 'ą' => 'Ą', + 'ć' => 'Ć', + 'ĉ' => 'Ĉ', + 'ċ' => 'Ċ', + 'č' => 'Č', + 'ď' => 'Ď', + 'đ' => 'Đ', + 'ē' => 'Ē', + 'ĕ' => 'Ĕ', + 'ė' => 'Ė', + 'ę' => 'Ę', + 'ě' => 'Ě', + 'ĝ' => 'Ĝ', + 'ğ' => 'Ğ', + 'ġ' => 'Ġ', + 'ģ' => 'Ģ', + 'ĥ' => 'Ĥ', + 'ħ' => 'Ħ', + 'ĩ' => 'Ĩ', + 'ī' => 'Ī', + 'ĭ' => 'Ĭ', + 'į' => 'Į', + 'ı' => 'I', + 'ij' => 'IJ', + 'ĵ' => 'Ĵ', + 'ķ' => 'Ķ', + 'ĺ' => 'Ĺ', + 'ļ' => 'Ļ', + 'ľ' => 'Ľ', + 'ŀ' => 'Ŀ', + 'ł' => 'Ł', + 'ń' => 'Ń', + 'ņ' => 'Ņ', + 'ň' => 'Ň', + 'ŋ' => 'Ŋ', + 'ō' => 'Ō', + 'ŏ' => 'Ŏ', + 'ő' => 'Ő', + 'œ' => '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 'Ϥ', + 'ϧ' => 'Ϧ', + 'ϩ' => 'Ϩ', + 'ϫ' => 'Ϫ', + 'ϭ' => 'Ϭ', + 'ϯ' => 'Ϯ', + 'ϰ' => 'Κ', + 'ϱ' => 'Ρ', + 'ϲ' => 'Ϲ', + 'ϳ' => 'Ϳ', + 'ϵ' => 'Ε', + 'ϸ' => 'Ϸ', + 'ϻ' => 'Ϻ', + 'а' => 'А', + 'б' => 'Б', + 'в' => 'В', + 'г' => 'Г', + 'д' => 'Д', + 'е' => 'Е', + 'ж' => 'Ж', + 'з' => 'З', + 'и' => 'И', + 'й' => 'Й', + 'к' => 'К', + 'л' => 'Л', + 'м' => 'М', + 'н' => 'Н', + 'о' => 'О', + 'п' => 'П', + 'р' => 'Р', + 'с' => 'С', + 'т' => 'Т', + 'у' => 'У', + 'ф' => 'Ф', + 'х' => 'Х', + 'ц' => 'Ц', + 'ч' => 'Ч', + 'ш' => 'Ш', + 'щ' => 'Щ', + 'ъ' => 'Ъ', + 'ы' => 'Ы', + 'ь' => 'Ь', + 'э' => 'Э', + 'ю' => 'Ю', + 'я' => 'Я', + 'ѐ' => 'Ѐ', + 'ё' => 'Ё', + 'ђ' => 'Ђ', + 'ѓ' => 'Ѓ', + 'є' => 'Є', + 'ѕ' => 'Ѕ', + 'і' => 'І', + 'ї' => 'Ї', + 'ј' => 'Ј', + 'љ' => 'Љ', + 'њ' => 'Њ', + 'ћ' => 'Ћ', + 'ќ' => 'Ќ', + 'ѝ' => 'Ѝ', + 'ў' => 'Ў', + 'џ' => 'Џ', + 'ѡ' => 'Ѡ', + 'ѣ' => 'Ѣ', + 'ѥ' => 'Ѥ', + 'ѧ' => 'Ѧ', + 'ѩ' => 'Ѩ', + 'ѫ' => 'Ѫ', + 'ѭ' => 'Ѭ', + 'ѯ' => 'Ѯ', + 'ѱ' => 'Ѱ', + 'ѳ' => 'Ѳ', + 'ѵ' => 'Ѵ', + 'ѷ' => 'Ѷ', + 'ѹ' => 'Ѹ', + 'ѻ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 'Ḇ', + 'ḉ' => 'Ḉ', + 'ḋ' => 'Ḋ', + 'ḍ' => 'Ḍ', + 'ḏ' => 'Ḏ', + 'ḑ' => 'Ḑ', + 'ḓ' => 'Ḓ', + 'ḕ' => 'Ḕ', + 'ḗ' => 'Ḗ', + 'ḙ' => 'Ḙ', + 'ḛ' => 'Ḛ', + 'ḝ' => 'Ḝ', + 'ḟ' => 'Ḟ', + 'ḡ' => 'Ḡ', + 'ḣ' => 'Ḣ', + 'ḥ' => 'Ḥ', + 'ḧ' => 'Ḧ', + 'ḩ' => 'Ḩ', + 'ḫ' => 'Ḫ', + 'ḭ' => 'Ḭ', + 'ḯ' => 'Ḯ', + 'ḱ' => 'Ḱ', + 'ḳ' => 'Ḳ', + 'ḵ' => 'Ḵ', + 'ḷ' => 'Ḷ', + 'ḹ' => 'Ḹ', + 'ḻ' => 'Ḻ', + 'ḽ' => 'Ḽ', + 'ḿ' => 'Ḿ', + 'ṁ' => 'Ṁ', + 'ṃ' => 'Ṃ', + 'ṅ' => 'Ṅ', + 'ṇ' => 'Ṇ', + 'ṉ' => 'Ṉ', + 'ṋ' => 'Ṋ', + 'ṍ' => 'Ṍ', + 'ṏ' => 'Ṏ', + 'ṑ' => 'Ṑ', + 'ṓ' => 'Ṓ', + 'ṕ' => 'Ṕ', + 'ṗ' => 'Ṗ', + 'ṙ' => 'Ṙ', + 'ṛ' => 'Ṛ', + 'ṝ' => 'Ṝ', + 'ṟ' => 'Ṟ', + 'ṡ' => 'Ṡ', + 'ṣ' => 'Ṣ', + 'ṥ' => 'Ṥ', + 'ṧ' => 'Ṧ', + 'ṩ' => 'Ṩ', + 'ṫ' => 'Ṫ', + 'ṭ' => 'Ṭ', + 'ṯ' => 'Ṯ', + 'ṱ' => 'Ṱ', + 'ṳ' => 'Ṳ', + 'ṵ' => 'Ṵ', + 'ṷ' => 'Ṷ', + 'ṹ' => 'Ṹ', + 'ṻ' => 'Ṻ', + 'ṽ' => 'Ṽ', + 'ṿ' => 'Ṿ', + 'ẁ' => 'Ẁ', + 'ẃ' => 'Ẃ', + 'ẅ' => 'Ẅ', + 'ẇ' => 'Ẇ', + 'ẉ' => 'Ẉ', + 'ẋ' => 'Ẋ', + 'ẍ' => 'Ẍ', + 'ẏ' => 'Ẏ', + 'ẑ' => 'Ẑ', + 'ẓ' => 'Ẓ', + 'ẕ' => 'Ẕ', + 'ẛ' => 'Ṡ', + 'ạ' => 'Ạ', + 'ả' => 'Ả', + 'ấ' => 'Ấ', + 'ầ' => 'Ầ', + 'ẩ' => 'Ẩ', + 'ẫ' => 'Ẫ', + 'ậ' => 'Ậ', + 'ắ' => 'Ắ', + 'ằ' => 'Ằ', + 'ẳ' => 'Ẳ', + 'ẵ' => 'Ẵ', + 'ặ' => 'Ặ', + 'ẹ' => 'Ẹ', + 'ẻ' => 'Ẻ', + 'ẽ' => 'Ẽ', + 'ế' => 'Ế', + 'ề' => 'Ề', + 'ể' => 'Ể', + 'ễ' => 'Ễ', + 'ệ' => 'Ệ', + 'ỉ' => 'Ỉ', + 'ị' => 'Ị', + 'ọ' => 'Ọ', + 'ỏ' => 'Ỏ', + 'ố' => 'Ố', + 'ồ' => 'Ồ', + 'ổ' => 'Ổ', + 'ỗ' => 'Ỗ', + 'ộ' => 'Ộ', + 'ớ' => 'Ớ', + 'ờ' => 'Ờ', + 'ở' => 'Ở', + 'ỡ' => 'Ỡ', + 'ợ' => 'Ợ', + 'ụ' => 'Ụ', + 'ủ' => 'Ủ', + 'ứ' => 'Ứ', + 'ừ' => 'Ừ', + 'ử' => 'Ử', + 'ữ' => 'Ữ', + 'ự' => 'Ự', + 'ỳ' => 'Ỳ', + 'ỵ' => 'Ỵ', + 'ỷ' => 'Ỷ', + 'ỹ' => 'Ỹ', + 'ỻ' => 'Ỻ', + 'ỽ' => 'Ỽ', + 'ỿ' => 'Ỿ', + 'ἀ' => 'Ἀ', + 'ἁ' => 'Ἁ', + 'ἂ' => 'Ἂ', + 'ἃ' => 'Ἃ', + 'ἄ' => 'Ἄ', + 'ἅ' => 'Ἅ', + 'ἆ' => 'Ἆ', + 'ἇ' => 'Ἇ', + 'ἐ' => 'Ἐ', + 'ἑ' => 'Ἑ', + 'ἒ' => 'Ἒ', + 'ἓ' => 'Ἓ', + 'ἔ' => 'Ἔ', + 'ἕ' => 'Ἕ', + 'ἠ' => 'Ἠ', + 'ἡ' => 'Ἡ', + 'ἢ' => 'Ἢ', + 'ἣ' => 'Ἣ', + 'ἤ' => 'Ἤ', + 'ἥ' => 'Ἥ', + 'ἦ' => 'Ἦ', + 'ἧ' => 'Ἧ', + 'ἰ' => 'Ἰ', + 'ἱ' => 'Ἱ', + 'ἲ' => 'Ἲ', + 'ἳ' => 'Ἳ', + 'ἴ' => 'Ἴ', + 'ἵ' => 'Ἵ', + 'ἶ' => 'Ἶ', + 'ἷ' => 'Ἷ', + 'ὀ' => 'Ὀ', + 'ὁ' => 'Ὁ', + 'ὂ' => 'Ὂ', + 'ὃ' => 'Ὃ', + 'ὄ' => 'Ὄ', + 'ὅ' => 'Ὅ', + 'ὑ' => 'Ὑ', + 'ὓ' => 'Ὓ', + 'ὕ' => 'Ὕ', + 'ὗ' => 'Ὗ', + 'ὠ' => 'Ὠ', + 'ὡ' => 'Ὡ', + 'ὢ' => 'Ὢ', + 'ὣ' => 'Ὣ', + 'ὤ' => 'Ὤ', + 'ὥ' => 'Ὥ', + 'ὦ' => 'Ὦ', + 'ὧ' => 'Ὧ', + 'ὰ' => 'Ὰ', + 'ά' => 'Ά', + 'ὲ' => 'Ὲ', + 'έ' => 'Έ', + 'ὴ' => 'Ὴ', + 'ή' => 'Ή', + 'ὶ' => 'Ὶ', + 'ί' => 'Ί', + 'ὸ' => 'Ὸ', + 'ό' => 'Ό', + 'ὺ' => 'Ὺ', + 'ύ' => 'Ύ', + 'ὼ' => 'Ὼ', + 'ώ' => 'Ώ', + 'ᾀ' => 'ᾈ', + 'ᾁ' => 'ᾉ', + 'ᾂ' => 'ᾊ', + 'ᾃ' => 'ᾋ', + 'ᾄ' => 'ᾌ', + 'ᾅ' => 'ᾍ', + 'ᾆ' => 'ᾎ', + 'ᾇ' => 'ᾏ', + 'ᾐ' => 'ᾘ', + 'ᾑ' => 'ᾙ', + 'ᾒ' => 'ᾚ', + 'ᾓ' => 'ᾛ', + 'ᾔ' => 'ᾜ', + 'ᾕ' => 'ᾝ', + 'ᾖ' => 'ᾞ', + 'ᾗ' => 'ᾟ', + 'ᾠ' => 'ᾨ', + 'ᾡ' => 'ᾩ', + 'ᾢ' => 'ᾪ', + 'ᾣ' => 'ᾫ', + 'ᾤ' => 'ᾬ', + 'ᾥ' => 'ᾭ', + 'ᾦ' => 'ᾮ', + 'ᾧ' => 'ᾯ', + 'ᾰ' => 'Ᾰ', + 'ᾱ' => 'Ᾱ', + 'ᾳ' => 'ᾼ', + 'ι' => 'Ι', + 'ῃ' => 'ῌ', + 'ῐ' => 'Ῐ', + 'ῑ' => 'Ῑ', + 'ῠ' => 'Ῠ', + 'ῡ' => 'Ῡ', + 'ῥ' => 'Ῥ', + 'ῳ' => 'ῼ', + 'ⅎ' => 'Ⅎ', + 'ⅰ' => 'Ⅰ', + 'ⅱ' => 'Ⅱ', + 'ⅲ' => 'Ⅲ', + 'ⅳ' => 'Ⅳ', + 'ⅴ' => 'Ⅴ', + 'ⅵ' => 'Ⅵ', + 'ⅶ' => 'Ⅶ', + 'ⅷ' => 'Ⅷ', + 'ⅸ' => 'Ⅸ', + 'ⅹ' => 'Ⅹ', + 'ⅺ' => 'Ⅺ', + 'ⅻ' => 'Ⅻ', + 'ⅼ' => 'Ⅼ', + 'ⅽ' => 'Ⅽ', + 'ⅾ' => 'Ⅾ', + 'ⅿ' => 'Ⅿ', + 'ↄ' => 'Ↄ', + 'ⓐ' => 'Ⓐ', + 'ⓑ' => 'Ⓑ', + 'ⓒ' => 'Ⓒ', + 'ⓓ' => 'Ⓓ', + 'ⓔ' => 'Ⓔ', + 'ⓕ' => 'Ⓕ', + 'ⓖ' => 'Ⓖ', + 'ⓗ' => 'Ⓗ', + 'ⓘ' => 'Ⓘ', + 'ⓙ' => 'Ⓙ', + 'ⓚ' => 'Ⓚ', + 'ⓛ' => 'Ⓛ', + 'ⓜ' => 'Ⓜ', + 'ⓝ' => 'Ⓝ', + 'ⓞ' => 'Ⓞ', + 'ⓟ' => 'Ⓟ', + 'ⓠ' => 'Ⓠ', + 'ⓡ' => 'Ⓡ', + 'ⓢ' => 'Ⓢ', + 'ⓣ' => 'Ⓣ', + 'ⓤ' => 'Ⓤ', + 'ⓥ' => 'Ⓥ', + 'ⓦ' => 'Ⓦ', + 'ⓧ' => 'Ⓧ', + 'ⓨ' => 'Ⓨ', + 'ⓩ' => 'Ⓩ', + 'ⰰ' => 'Ⰰ', + 'ⰱ' => 'Ⰱ', + 'ⰲ' => 'Ⰲ', + 'ⰳ' => 'Ⰳ', + 'ⰴ' => 'Ⰴ', + 'ⰵ' => 'Ⰵ', + 'ⰶ' => 'Ⰶ', + 'ⰷ' => 'Ⰷ', + 'ⰸ' => 'Ⰸ', + 'ⰹ' => 'Ⰹ', + 'ⰺ' => 'Ⰺ', + 'ⰻ' => 'Ⰻ', + 'ⰼ' => 'Ⰼ', + 'ⰽ' => 'Ⰽ', + 'ⰾ' => 'Ⰾ', + 'ⰿ' => 'Ⰿ', + 'ⱀ' => 'Ⱀ', + 'ⱁ' => 'Ⱁ', + 'ⱂ' => 'Ⱂ', + 'ⱃ' => 'Ⱃ', + 'ⱄ' => 'Ⱄ', + 'ⱅ' => 'Ⱅ', + 'ⱆ' => 'Ⱆ', + 'ⱇ' => 'Ⱇ', + 'ⱈ' => 'Ⱈ', + 'ⱉ' => 'Ⱉ', + 'ⱊ' => 'Ⱊ', + 'ⱋ' => 'Ⱋ', + 'ⱌ' => 'Ⱌ', + 'ⱍ' => 'Ⱍ', + 'ⱎ' => 'Ⱎ', + 'ⱏ' => 'Ⱏ', + 'ⱐ' => 'Ⱐ', + 'ⱑ' => 'Ⱑ', + 'ⱒ' => 'Ⱒ', + 'ⱓ' => 'Ⱓ', + 'ⱔ' => 'Ⱔ', + 'ⱕ' => 'Ⱕ', + 'ⱖ' => 'Ⱖ', + 'ⱗ' => 'Ⱗ', + 'ⱘ' => 'Ⱘ', + 'ⱙ' => 'Ⱙ', + 'ⱚ' => 'Ⱚ', + 'ⱛ' => 'Ⱛ', + 'ⱜ' => 'Ⱜ', + 'ⱝ' => 'Ⱝ', + 'ⱞ' => 'Ⱞ', + 'ⱡ' => 'Ⱡ', + 'ⱥ' => 'Ⱥ', + 'ⱦ' => 'Ⱦ', + 'ⱨ' => 'Ⱨ', + 'ⱪ' => 'Ⱪ', + 'ⱬ' => 'Ⱬ', + 'ⱳ' => 'Ⱳ', + 'ⱶ' => 'Ⱶ', + 'ⲁ' => 'Ⲁ', + 'ⲃ' => 'Ⲃ', + 'ⲅ' => 'Ⲅ', + 'ⲇ' => 'Ⲇ', + 'ⲉ' => 'Ⲉ', + 'ⲋ' => 'Ⲋ', + 'ⲍ' => 'Ⲍ', + 'ⲏ' => 'Ⲏ', + 'ⲑ' => 'Ⲑ', + 'ⲓ' => 'Ⲓ', + 'ⲕ' => 'Ⲕ', + 'ⲗ' => 'Ⲗ', + 'ⲙ' => 'Ⲙ', + 'ⲛ' => 'Ⲛ', + 'ⲝ' => 'Ⲝ', + 'ⲟ' => 'Ⲟ', + 'ⲡ' => 'Ⲡ', + 'ⲣ' => 'Ⲣ', + 'ⲥ' => 'Ⲥ', + 'ⲧ' => 'Ⲧ', + 'ⲩ' => 'Ⲩ', + 'ⲫ' => 'Ⲫ', + 'ⲭ' => 'Ⲭ', + 'ⲯ' => 'Ⲯ', + 'ⲱ' => 'Ⲱ', + 'ⲳ' => 'Ⲳ', + 'ⲵ' => 'Ⲵ', + 'ⲷ' => 'Ⲷ', + 'ⲹ' => 'Ⲹ', + 'ⲻ' => 'Ⲻ', + 'ⲽ' => 'Ⲽ', + 'ⲿ' => 'Ⲿ', + 'ⳁ' => 'Ⳁ', + 'ⳃ' => 'Ⳃ', + 'ⳅ' => 'Ⳅ', + 'ⳇ' => 'Ⳇ', + 'ⳉ' => 'Ⳉ', + 'ⳋ' => 'Ⳋ', + 'ⳍ' => 'Ⳍ', + 'ⳏ' => 'Ⳏ', + 'ⳑ' => 'Ⳑ', + 'ⳓ' => 'Ⳓ', + 'ⳕ' => 'Ⳕ', + 'ⳗ' => 'Ⳗ', + 'ⳙ' => 'Ⳙ', + 'ⳛ' => 'Ⳛ', + 'ⳝ' => 'Ⳝ', + 'ⳟ' => 'Ⳟ', + 'ⳡ' => 'Ⳡ', + 'ⳣ' => 'Ⳣ', + 'ⳬ' => 'Ⳬ', + 'ⳮ' => 'Ⳮ', + 'ⳳ' => 'Ⳳ', + 'ⴀ' => 'Ⴀ', + 'ⴁ' => 'Ⴁ', + 'ⴂ' => 'Ⴂ', + 'ⴃ' => 'Ⴃ', + 'ⴄ' => 'Ⴄ', + 'ⴅ' => 'Ⴅ', + 'ⴆ' => 'Ⴆ', + 'ⴇ' => 'Ⴇ', + 'ⴈ' => 'Ⴈ', + 'ⴉ' => 'Ⴉ', + 'ⴊ' => 'Ⴊ', + 'ⴋ' => 'Ⴋ', + 'ⴌ' => 'Ⴌ', + 'ⴍ' => 'Ⴍ', + 'ⴎ' => 'Ⴎ', + 'ⴏ' => 'Ⴏ', + 'ⴐ' => 'Ⴐ', + 'ⴑ' => 'Ⴑ', + 'ⴒ' => 'Ⴒ', + 'ⴓ' => 'Ⴓ', + 'ⴔ' => 'Ⴔ', + 'ⴕ' => 'Ⴕ', + 'ⴖ' => 'Ⴖ', + 'ⴗ' => 'Ⴗ', + 'ⴘ' => 'Ⴘ', + 'ⴙ' => 'Ⴙ', + 'ⴚ' => 'Ⴚ', + 'ⴛ' => 'Ⴛ', + 'ⴜ' => 'Ⴜ', + 'ⴝ' => 'Ⴝ', + 'ⴞ' => 'Ⴞ', + 'ⴟ' => 'Ⴟ', + 'ⴠ' => 'Ⴠ', + 'ⴡ' => 'Ⴡ', + 'ⴢ' => 'Ⴢ', + 'ⴣ' => 'Ⴣ', + 'ⴤ' => 'Ⴤ', + 'ⴥ' => 'Ⴥ', + 'ⴧ' => 'Ⴧ', + 'ⴭ' => 'Ⴭ', + 'ꙁ' => 'Ꙁ', + 'ꙃ' => 'Ꙃ', + 'ꙅ' => 'Ꙅ', + 'ꙇ' => 'Ꙇ', + 'ꙉ' => 'Ꙉ', + 'ꙋ' => 'Ꙋ', + 'ꙍ' => 'Ꙍ', + 'ꙏ' => 'Ꙏ', + 'ꙑ' => 'Ꙑ', + 'ꙓ' => 'Ꙓ', + 'ꙕ' => 'Ꙕ', + 'ꙗ' => 'Ꙗ', + 'ꙙ' => 'Ꙙ', + 'ꙛ' => 'Ꙛ', + 'ꙝ' => 'Ꙝ', + 'ꙟ' => 'Ꙟ', + 'ꙡ' => 'Ꙡ', + 'ꙣ' => 'Ꙣ', + 'ꙥ' => 'Ꙥ', + 'ꙧ' => 'Ꙧ', + 'ꙩ' => 'Ꙩ', + 'ꙫ' => 'Ꙫ', + 'ꙭ' => 'Ꙭ', + 'ꚁ' => 'Ꚁ', + 'ꚃ' => 'Ꚃ', + 'ꚅ' => 'Ꚅ', + 'ꚇ' => 'Ꚇ', + 'ꚉ' => 'Ꚉ', + 'ꚋ' => 'Ꚋ', + 'ꚍ' => 'Ꚍ', + 'ꚏ' => 'Ꚏ', + 'ꚑ' => 'Ꚑ', + 'ꚓ' => 'Ꚓ', + 'ꚕ' => 'Ꚕ', + 'ꚗ' => 'Ꚗ', + 'ꚙ' => 'Ꚙ', + 'ꚛ' => 'Ꚛ', + 'ꜣ' => 'Ꜣ', + 'ꜥ' => 'Ꜥ', + 'ꜧ' => 'Ꜧ', + 'ꜩ' => 'Ꜩ', + 'ꜫ' => 'Ꜫ', + 'ꜭ' => 'Ꜭ', + 'ꜯ' => 'Ꜯ', + 'ꜳ' => 'Ꜳ', + 'ꜵ' => 'Ꜵ', + 'ꜷ' => 'Ꜷ', + 'ꜹ' => 'Ꜹ', + 'ꜻ' => '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'O', + 'p' => 'P', + 'q' => 'Q', + 'r' => 'R', + 's' => 'S', + 't' => 'T', + 'u' => 'U', + 'v' => 'V', + 'w' => 'W', + 'x' => 'X', + 'y' => 'Y', + 'z' => 'Z', + '𐐨' => '𐐀', + '𐐩' => '𐐁', + '𐐪' => '𐐂', + '𐐫' => '𐐃', + '𐐬' => '𐐄', + '𐐭' => '𐐅', + '𐐮' => '𐐆', + '𐐯' => '𐐇', + '𐐰' => '𐐈', + '𐐱' => '𐐉', + '𐐲' => '𐐊', + '𐐳' => '𐐋', + '𐐴' => '𐐌', + '𐐵' => '𐐍', + '𐐶' => '𐐎', + '𐐷' => '𐐏', + '𐐸' => '𐐐', + '𐐹' => '𐐑', + '𐐺' => '𐐒', + '𐐻' => '𐐓', + '𐐼' => '𐐔', + '𐐽' => '𐐕', + '𐐾' => '𐐖', + '𐐿' => '𐐗', + '𐑀' => '𐐘', + '𐑁' => '𐐙', + '𐑂' => '𐐚', + '𐑃' => '𐐛', + '𐑄' => '𐐜', + '𐑅' => '𐐝', + '𐑆' => '𐐞', + '𐑇' => '𐐟', + '𐑈' => '𐐠', + '𐑉' => '𐐡', + '𐑊' => '𐐢', + '𐑋' => '𐐣', + '𐑌' => '𐐤', + '𐑍' => '𐐥', + '𐑎' => '𐐦', + '𐑏' => '𐐧', + '𑣀' => '𑢠', + '𑣁' => '𑢡', + '𑣂' => '𑢢', + '𑣃' => '𑢣', + '𑣄' => '𑢤', + '𑣅' => '𑢥', + '𑣆' => '𑢦', + '𑣇' => '𑢧', + '𑣈' => '𑢨', + '𑣉' => '𑢩', + '𑣊' => '𑢪', + '𑣋' => '𑢫', + '𑣌' => '𑢬', + '𑣍' => '𑢭', + '𑣎' => '𑢮', + '𑣏' => '𑢯', + '𑣐' => '𑢰', + '𑣑' => '𑢱', + '𑣒' => '𑢲', + '𑣓' => '𑢳', + '𑣔' => '𑢴', + '𑣕' => '𑢵', + '𑣖' => '𑢶', + '𑣗' => '𑢷', + '𑣘' => '𑢸', + '𑣙' => '𑢹', + '𑣚' => '𑢺', + '𑣛' => '𑢻', + '𑣜' => '𑢼', + '𑣝' => '𑢽', + '𑣞' => '𑢾', + '𑣟' => '𑢿', +); diff --git a/addons/weliam_smartcity/vendor/symfony/polyfill-mbstring/bootstrap.php b/addons/weliam_smartcity/vendor/symfony/polyfill-mbstring/bootstrap.php new file mode 100644 index 0000000..204a41b --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/polyfill-mbstring/bootstrap.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Mbstring as p; + +if (!function_exists('mb_strlen')) { + define('MB_CASE_UPPER', 0); + define('MB_CASE_LOWER', 1); + define('MB_CASE_TITLE', 2); + + function mb_convert_encoding($s, $to, $from = null) { return p\Mbstring::mb_convert_encoding($s, $to, $from); } + function mb_decode_mimeheader($s) { return p\Mbstring::mb_decode_mimeheader($s); } + function mb_encode_mimeheader($s, $charset = null, $transferEnc = null, $lf = null, $indent = null) { return p\Mbstring::mb_encode_mimeheader($s, $charset, $transferEnc, $lf, $indent); } + function mb_decode_numericentity($s, $convmap, $enc = null) { return p\Mbstring::mb_decode_numericentity($s, $convmap, $enc); } + function mb_encode_numericentity($s, $convmap, $enc = null, $is_hex = false) { return p\Mbstring::mb_encode_numericentity($s, $convmap, $enc, $is_hex); } + function mb_convert_case($s, $mode, $enc = null) { return p\Mbstring::mb_convert_case($s, $mode, $enc); } + function mb_internal_encoding($enc = null) { return p\Mbstring::mb_internal_encoding($enc); } + function mb_language($lang = null) { return p\Mbstring::mb_language($lang); } + function mb_list_encodings() { return p\Mbstring::mb_list_encodings(); } + function mb_encoding_aliases($encoding) { return p\Mbstring::mb_encoding_aliases($encoding); } + function mb_check_encoding($var = null, $encoding = null) { return p\Mbstring::mb_check_encoding($var, $encoding); } + function mb_detect_encoding($str, $encodingList = null, $strict = false) { return p\Mbstring::mb_detect_encoding($str, $encodingList, $strict); } + function mb_detect_order($encodingList = null) { return p\Mbstring::mb_detect_order($encodingList); } + function mb_parse_str($s, &$result = array()) { parse_str($s, $result); } + function mb_strlen($s, $enc = null) { return p\Mbstring::mb_strlen($s, $enc); } + function mb_strpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strpos($s, $needle, $offset, $enc); } + function mb_strtolower($s, $enc = null) { return p\Mbstring::mb_strtolower($s, $enc); } + function mb_strtoupper($s, $enc = null) { return p\Mbstring::mb_strtoupper($s, $enc); } + function mb_substitute_character($char = null) { return p\Mbstring::mb_substitute_character($char); } + function mb_substr($s, $start, $length = 2147483647, $enc = null) { return p\Mbstring::mb_substr($s, $start, $length, $enc); } + function mb_stripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_stripos($s, $needle, $offset, $enc); } + function mb_stristr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_stristr($s, $needle, $part, $enc); } + function mb_strrchr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrchr($s, $needle, $part, $enc); } + function mb_strrichr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrichr($s, $needle, $part, $enc); } + function mb_strripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strripos($s, $needle, $offset, $enc); } + function mb_strrpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strrpos($s, $needle, $offset, $enc); } + function mb_strstr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strstr($s, $needle, $part, $enc); } + function mb_get_info($type = 'all') { return p\Mbstring::mb_get_info($type); } + function mb_http_output($enc = null) { return p\Mbstring::mb_http_output($enc); } + function mb_strwidth($s, $enc = null) { return p\Mbstring::mb_strwidth($s, $enc); } + function mb_substr_count($haystack, $needle, $enc = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $enc); } + function mb_output_handler($contents, $status) { return p\Mbstring::mb_output_handler($contents, $status); } + function mb_http_input($type = '') { return p\Mbstring::mb_http_input($type); } + function mb_convert_variables($toEncoding, $fromEncoding, &$a = null, &$b = null, &$c = null, &$d = null, &$e = null, &$f = null) { return p\Mbstring::mb_convert_variables($toEncoding, $fromEncoding, $a, $b, $c, $d, $e, $f); } +} +if (!function_exists('mb_chr')) { + function mb_ord($s, $enc = null) { return p\Mbstring::mb_ord($s, $enc); } + function mb_chr($code, $enc = null) { return p\Mbstring::mb_chr($code, $enc); } + function mb_scrub($s, $enc = null) { $enc = null === $enc ? mb_internal_encoding() : $enc; return mb_convert_encoding($s, $enc, $enc); } +} + +if (!function_exists('mb_str_split')) { + function mb_str_split($string, $split_length = 1, $encoding = null) { return p\Mbstring::mb_str_split($string, $split_length, $encoding); } +} diff --git a/addons/weliam_smartcity/vendor/symfony/polyfill-mbstring/composer.json b/addons/weliam_smartcity/vendor/symfony/polyfill-mbstring/composer.json new file mode 100644 index 0000000..308f009 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/polyfill-mbstring/composer.json @@ -0,0 +1,34 @@ +{ + "name": "symfony/polyfill-mbstring", + "type": "library", + "description": "Symfony polyfill for the Mbstring extension", + "keywords": ["polyfill", "shim", "compatibility", "portable", "mbstring"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.3.3" + }, + "autoload": { + "psr-4": { "Symfony\\Polyfill\\Mbstring\\": "" }, + "files": [ "bootstrap.php" ] + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "1.12-dev" + } + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/polyfill-php72/LICENSE b/addons/weliam_smartcity/vendor/symfony/polyfill-php72/LICENSE new file mode 100644 index 0000000..4cd8bdd --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/polyfill-php72/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2015-2019 Fabien Potencier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/addons/weliam_smartcity/vendor/symfony/polyfill-php72/Php72.php b/addons/weliam_smartcity/vendor/symfony/polyfill-php72/Php72.php new file mode 100644 index 0000000..d531e84 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/polyfill-php72/Php72.php @@ -0,0 +1,216 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Php72; + +/** + * @author Nicolas Grekas + * @author Dariusz Rumiński + * + * @internal + */ +final class Php72 +{ + private static $hashMask; + + public static function utf8_encode($s) + { + $s .= $s; + $len = \strlen($s); + + for ($i = $len >> 1, $j = 0; $i < $len; ++$i, ++$j) { + switch (true) { + case $s[$i] < "\x80": $s[$j] = $s[$i]; break; + case $s[$i] < "\xC0": $s[$j] = "\xC2"; $s[++$j] = $s[$i]; break; + default: $s[$j] = "\xC3"; $s[++$j] = \chr(\ord($s[$i]) - 64); break; + } + } + + return substr($s, 0, $j); + } + + public static function utf8_decode($s) + { + $s = (string) $s; + $len = \strlen($s); + + for ($i = 0, $j = 0; $i < $len; ++$i, ++$j) { + switch ($s[$i] & "\xF0") { + case "\xC0": + case "\xD0": + $c = (\ord($s[$i] & "\x1F") << 6) | \ord($s[++$i] & "\x3F"); + $s[$j] = $c < 256 ? \chr($c) : '?'; + break; + + case "\xF0": + ++$i; + // no break + + case "\xE0": + $s[$j] = '?'; + $i += 2; + break; + + default: + $s[$j] = $s[$i]; + } + } + + return substr($s, 0, $j); + } + + public static function php_os_family() + { + if ('\\' === \DIRECTORY_SEPARATOR) { + return 'Windows'; + } + + $map = array( + 'Darwin' => 'Darwin', + 'DragonFly' => 'BSD', + 'FreeBSD' => 'BSD', + 'NetBSD' => 'BSD', + 'OpenBSD' => 'BSD', + 'Linux' => 'Linux', + 'SunOS' => 'Solaris', + ); + + return isset($map[PHP_OS]) ? $map[PHP_OS] : 'Unknown'; + } + + public static function spl_object_id($object) + { + if (null === self::$hashMask) { + self::initHashMask(); + } + if (null === $hash = spl_object_hash($object)) { + return; + } + + return self::$hashMask ^ hexdec(substr($hash, 16 - \PHP_INT_SIZE, \PHP_INT_SIZE)); + } + + public static function sapi_windows_vt100_support($stream, $enable = null) + { + if (!\is_resource($stream)) { + trigger_error('sapi_windows_vt100_support() expects parameter 1 to be resource, '.\gettype($stream).' given', E_USER_WARNING); + + return false; + } + + $meta = stream_get_meta_data($stream); + + if ('STDIO' !== $meta['stream_type']) { + trigger_error('sapi_windows_vt100_support() was not able to analyze the specified stream', E_USER_WARNING); + + return false; + } + + // We cannot actually disable vt100 support if it is set + if (false === $enable || !self::stream_isatty($stream)) { + return false; + } + + // The native function does not apply to stdin + $meta = array_map('strtolower', $meta); + $stdin = 'php://stdin' === $meta['uri'] || 'php://fd/0' === $meta['uri']; + + return !$stdin + && (false !== getenv('ANSICON') + || 'ON' === getenv('ConEmuANSI') + || 'xterm' === getenv('TERM') + || 'Hyper' === getenv('TERM_PROGRAM')); + } + + public static function stream_isatty($stream) + { + if (!\is_resource($stream)) { + trigger_error('stream_isatty() expects parameter 1 to be resource, '.\gettype($stream).' given', E_USER_WARNING); + + return false; + } + + if ('\\' === \DIRECTORY_SEPARATOR) { + $stat = @fstat($stream); + // Check if formatted mode is S_IFCHR + return $stat ? 0020000 === ($stat['mode'] & 0170000) : false; + } + + return \function_exists('posix_isatty') && @posix_isatty($stream); + } + + private static function initHashMask() + { + $obj = (object) array(); + self::$hashMask = -1; + + // check if we are nested in an output buffering handler to prevent a fatal error with ob_start() below + $obFuncs = array('ob_clean', 'ob_end_clean', 'ob_flush', 'ob_end_flush', 'ob_get_contents', 'ob_get_flush'); + foreach (debug_backtrace(\PHP_VERSION_ID >= 50400 ? DEBUG_BACKTRACE_IGNORE_ARGS : false) as $frame) { + if (isset($frame['function'][0]) && !isset($frame['class']) && 'o' === $frame['function'][0] && \in_array($frame['function'], $obFuncs)) { + $frame['line'] = 0; + break; + } + } + if (!empty($frame['line'])) { + ob_start(); + debug_zval_dump($obj); + self::$hashMask = (int) substr(ob_get_clean(), 17); + } + + self::$hashMask ^= hexdec(substr(spl_object_hash($obj), 16 - \PHP_INT_SIZE, \PHP_INT_SIZE)); + } + + public static function mb_chr($code, $encoding = null) + { + if (0x80 > $code %= 0x200000) { + $s = \chr($code); + } elseif (0x800 > $code) { + $s = \chr(0xC0 | $code >> 6).\chr(0x80 | $code & 0x3F); + } elseif (0x10000 > $code) { + $s = \chr(0xE0 | $code >> 12).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); + } else { + $s = \chr(0xF0 | $code >> 18).\chr(0x80 | $code >> 12 & 0x3F).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); + } + + if ('UTF-8' !== $encoding) { + $s = mb_convert_encoding($s, $encoding, 'UTF-8'); + } + + return $s; + } + + public static function mb_ord($s, $encoding = null) + { + if (null == $encoding) { + $s = mb_convert_encoding($s, 'UTF-8'); + } elseif ('UTF-8' !== $encoding) { + $s = mb_convert_encoding($s, 'UTF-8', $encoding); + } + + if (1 === \strlen($s)) { + return \ord($s); + } + + $code = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0; + if (0xF0 <= $code) { + return (($code - 0xF0) << 18) + (($s[2] - 0x80) << 12) + (($s[3] - 0x80) << 6) + $s[4] - 0x80; + } + if (0xE0 <= $code) { + return (($code - 0xE0) << 12) + (($s[2] - 0x80) << 6) + $s[3] - 0x80; + } + if (0xC0 <= $code) { + return (($code - 0xC0) << 6) + $s[2] - 0x80; + } + + return $code; + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/polyfill-php72/README.md b/addons/weliam_smartcity/vendor/symfony/polyfill-php72/README.md new file mode 100644 index 0000000..82c45f7 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/polyfill-php72/README.md @@ -0,0 +1,27 @@ +Symfony Polyfill / Php72 +======================== + +This component provides functions added to PHP 7.2 core: + +- [`spl_object_id`](https://php.net/spl_object_id) +- [`stream_isatty`](https://php.net/stream_isatty) + +On Windows only: + +- [`sapi_windows_vt100_support`](https://php.net/sapi_windows_vt100_support) + +Moved to core since 7.2 (was in the optional XML extension earlier): + +- [`utf8_encode`](https://php.net/utf8_encode) +- [`utf8_decode`](https://php.net/utf8_decode) + +Also, it provides a constant added to PHP 7.2: +- [`PHP_OS_FAMILY`](http://php.net/manual/en/reserved.constants.php#constant.php-os-family) + +More information can be found in the +[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). + +License +======= + +This library is released under the [MIT license](LICENSE). diff --git a/addons/weliam_smartcity/vendor/symfony/polyfill-php72/bootstrap.php b/addons/weliam_smartcity/vendor/symfony/polyfill-php72/bootstrap.php new file mode 100644 index 0000000..519056d --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/polyfill-php72/bootstrap.php @@ -0,0 +1,36 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Php72 as p; + +if (PHP_VERSION_ID < 70200) { + if ('\\' === DIRECTORY_SEPARATOR && !function_exists('sapi_windows_vt100_support')) { + function sapi_windows_vt100_support($stream, $enable = null) { return p\Php72::sapi_windows_vt100_support($stream, $enable); } + } + if (!function_exists('stream_isatty')) { + function stream_isatty($stream) { return p\Php72::stream_isatty($stream); } + } + if (!function_exists('utf8_encode')) { + function utf8_encode($s) { return p\Php72::utf8_encode($s); } + function utf8_decode($s) { return p\Php72::utf8_decode($s); } + } + if (!function_exists('spl_object_id')) { + function spl_object_id($s) { return p\Php72::spl_object_id($s); } + } + if (!defined('PHP_OS_FAMILY')) { + define('PHP_OS_FAMILY', p\Php72::php_os_family()); + } + if (!function_exists('mb_chr')) { + function mb_ord($s, $enc = null) { return p\Php72::mb_ord($s, $enc); } + function mb_chr($code, $enc = null) { return p\Php72::mb_chr($code, $enc); } + function mb_scrub($s, $enc = null) { $enc = null === $enc ? mb_internal_encoding() : $enc; return mb_convert_encoding($s, $enc, $enc); } + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/polyfill-php72/composer.json b/addons/weliam_smartcity/vendor/symfony/polyfill-php72/composer.json new file mode 100644 index 0000000..5cfcbb7 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/polyfill-php72/composer.json @@ -0,0 +1,31 @@ +{ + "name": "symfony/polyfill-php72", + "type": "library", + "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "keywords": ["polyfill", "shim", "compatibility", "portable"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.3.3" + }, + "autoload": { + "psr-4": { "Symfony\\Polyfill\\Php72\\": "" }, + "files": [ "bootstrap.php" ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "1.12-dev" + } + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/.gitignore b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/.gitignore new file mode 100644 index 0000000..027924f --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/.gitignore @@ -0,0 +1,4 @@ +vendor/ +composer.lock +phpunit.xml +.php_cs.cache diff --git a/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/.php_cs.dist b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/.php_cs.dist new file mode 100644 index 0000000..d741d39 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/.php_cs.dist @@ -0,0 +1,24 @@ +setRules([ + '@Symfony' => true, + '@Symfony:risky' => true, + '@PHPUnit48Migration:risky' => true, + 'php_unit_no_expectation_annotation' => false, // part of `PHPUnitXYMigration:risky` ruleset, to be enabled when PHPUnit 4.x support will be dropped, as we don't want to rewrite exceptions handling twice + 'array_syntax' => ['syntax' => 'short'], + 'fopen_flags' => false, + 'ordered_imports' => true, + 'protected_to_private' => false, + // Part of @Symfony:risky in PHP-CS-Fixer 2.13.0. To be removed from the config file once upgrading + 'native_function_invocation' => ['include' => ['@compiler_optimized'], 'scope' => 'namespaced'], + // Part of future @Symfony ruleset in PHP-CS-Fixer To be removed from the config file once upgrading + 'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'], + ]) + ->setRiskyAllowed(true) + ->setFinder( + PhpCsFixer\Finder::create() + ->in(__DIR__) + ->name('*.php') + ) +; diff --git a/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/.travis.yml b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/.travis.yml new file mode 100644 index 0000000..a247c61 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/.travis.yml @@ -0,0 +1,47 @@ +language: php +sudo: false +cache: + directories: + - $HOME/.composer/cache/files + - $HOME/symfony-bridge/.phpunit + +env: + global: + - PHPUNIT_FLAGS="-v" + - SYMFONY_PHPUNIT_DIR="$HOME/symfony-bridge/.phpunit" + +matrix: + fast_finish: true + include: + # Minimum supported dependencies with the latest and oldest PHP version + - php: 7.2 + env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak_vendors" + + - php: 7.1 + - php: 7.2 + env: COVERAGE=true PHPUNIT_FLAGS="-v --coverage-text" + + # Latest commit to master + - php: 7.2 + env: STABILITY="dev" + + allow_failures: + # Dev-master is allowed to fail. + - env: STABILITY="dev" + +before_install: + - if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi + - if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; fi; + - if ! [ -v "$DEPENDENCIES" ]; then composer require --no-update ${DEPENDENCIES}; fi; + +install: + # To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355 + - if [[ "$COMPOSER_FLAGS" == *"--prefer-lowest"* ]]; then composer update --prefer-dist --no-interaction --prefer-stable --quiet; fi + - composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction + - ./vendor/bin/simple-phpunit install + +script: + - composer validate --strict --no-check-lock + # simple-phpunit is the PHPUnit wrapper provided by the PHPUnit Bridge component and + # it helps with testing legacy code and deprecations (composer require symfony/phpunit-bridge) + - ./vendor/bin/simple-phpunit $PHPUNIT_FLAGS diff --git a/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/CHANGELOG.md b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/CHANGELOG.md new file mode 100644 index 0000000..70f3b82 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/CHANGELOG.md @@ -0,0 +1,18 @@ +CHANGELOG +========= + +* 1.1.0 (2018-08-30) + + * Added support for creating PSR-7 messages using PSR-17 factories + +* 1.0.2 (2017-12-19) + + * Fixed request target in PSR7 Request (mtibben) + +* 1.0.1 (2017-12-04) + + * Added support for Symfony 4 (dunglas) + +* 1.0.0 (2016-09-14) + + * Initial release diff --git a/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Factory/DiactorosFactory.php b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Factory/DiactorosFactory.php new file mode 100644 index 0000000..d3e70b5 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Factory/DiactorosFactory.php @@ -0,0 +1,175 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\PsrHttpMessage\Factory; + +@trigger_error(sprintf('The "%s" class is deprecated since symfony/psr-http-message-bridge 1.2, use PsrHttpFactory instead.', DiactorosFactory::class), E_USER_DEPRECATED); + +use Psr\Http\Message\UploadedFileInterface; +use Symfony\Bridge\PsrHttpMessage\HttpMessageFactoryInterface; +use Symfony\Component\HttpFoundation\BinaryFileResponse; +use Symfony\Component\HttpFoundation\File\UploadedFile; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\StreamedResponse; +use Zend\Diactoros\Response as DiactorosResponse; +use Zend\Diactoros\ServerRequest; +use Zend\Diactoros\ServerRequestFactory as DiactorosRequestFactory; +use Zend\Diactoros\Stream as DiactorosStream; +use Zend\Diactoros\UploadedFile as DiactorosUploadedFile; + +/** + * Builds Psr\HttpMessage instances using the Zend Diactoros implementation. + * + * @author Kévin Dunglas + * + * @deprecated since symfony/psr-http-message-bridge 1.2, use PsrHttpFactory instead + */ +class DiactorosFactory implements HttpMessageFactoryInterface +{ + public function __construct() + { + if (!class_exists('Zend\Diactoros\ServerRequestFactory')) { + throw new \RuntimeException('Zend Diactoros must be installed to use the DiactorosFactory.'); + } + } + + /** + * {@inheritdoc} + */ + public function createRequest(Request $symfonyRequest) + { + $server = method_exists('Zend\Diactoros\ServerRequestFactory', 'normalizeServer') + ? DiactorosRequestFactory::normalizeServer($symfonyRequest->server->all()) + : \Zend\Diactoros\normalizeServer($symfonyRequest->server->all()); + $headers = $symfonyRequest->headers->all(); + + $body = new DiactorosStream($symfonyRequest->getContent(true)); + + $files = method_exists('Zend\Diactoros\ServerRequestFactory', 'normalizeFiles') + ? DiactorosRequestFactory::normalizeFiles($this->getFiles($symfonyRequest->files->all())) + : \Zend\Diactoros\normalizeUploadedFiles($this->getFiles($symfonyRequest->files->all())); + + $request = new ServerRequest( + $server, + $files, + $symfonyRequest->getSchemeAndHttpHost().$symfonyRequest->getRequestUri(), + $symfonyRequest->getMethod(), + $body, + $headers + ); + + $request = $request + ->withCookieParams($symfonyRequest->cookies->all()) + ->withQueryParams($symfonyRequest->query->all()) + ->withParsedBody($symfonyRequest->request->all()) + ->withRequestTarget($symfonyRequest->getRequestUri()) + ; + + foreach ($symfonyRequest->attributes->all() as $key => $value) { + $request = $request->withAttribute($key, $value); + } + + return $request; + } + + /** + * Converts Symfony uploaded files array to the PSR one. + * + * @param array $uploadedFiles + * + * @return array + */ + private function getFiles(array $uploadedFiles) + { + $files = []; + + foreach ($uploadedFiles as $key => $value) { + if (null === $value) { + $files[$key] = new DiactorosUploadedFile(null, 0, UPLOAD_ERR_NO_FILE, null, null); + continue; + } + if ($value instanceof UploadedFile) { + $files[$key] = $this->createUploadedFile($value); + } else { + $files[$key] = $this->getFiles($value); + } + } + + return $files; + } + + /** + * Creates a PSR-7 UploadedFile instance from a Symfony one. + * + * @param UploadedFile $symfonyUploadedFile + * + * @return UploadedFileInterface + */ + private function createUploadedFile(UploadedFile $symfonyUploadedFile) + { + return new DiactorosUploadedFile( + $symfonyUploadedFile->getRealPath(), + (int) $symfonyUploadedFile->getSize(), + $symfonyUploadedFile->getError(), + $symfonyUploadedFile->getClientOriginalName(), + $symfonyUploadedFile->getClientMimeType() + ); + } + + /** + * {@inheritdoc} + */ + public function createResponse(Response $symfonyResponse) + { + if ($symfonyResponse instanceof BinaryFileResponse) { + $stream = new DiactorosStream($symfonyResponse->getFile()->getPathname(), 'r'); + } else { + $stream = new DiactorosStream('php://temp', 'wb+'); + if ($symfonyResponse instanceof StreamedResponse) { + ob_start(function ($buffer) use ($stream) { + $stream->write($buffer); + + return ''; + }); + + $symfonyResponse->sendContent(); + ob_end_clean(); + } else { + $stream->write($symfonyResponse->getContent()); + } + } + + $headers = $symfonyResponse->headers->all(); + if (!isset($headers['Set-Cookie']) && !isset($headers['set-cookie'])) { + $cookies = $symfonyResponse->headers->getCookies(); + if (!empty($cookies)) { + $headers['Set-Cookie'] = []; + foreach ($cookies as $cookie) { + $headers['Set-Cookie'][] = $cookie->__toString(); + } + } + } + + $response = new DiactorosResponse( + $stream, + $symfonyResponse->getStatusCode(), + $headers + ); + + $protocolVersion = $symfonyResponse->getProtocolVersion(); + if ('1.1' !== $protocolVersion) { + $response = $response->withProtocolVersion($protocolVersion); + } + + return $response; + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Factory/HttpFoundationFactory.php b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Factory/HttpFoundationFactory.php new file mode 100644 index 0000000..4be0aff --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Factory/HttpFoundationFactory.php @@ -0,0 +1,280 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\PsrHttpMessage\Factory; + +use Psr\Http\Message\ResponseInterface; +use Psr\Http\Message\ServerRequestInterface; +use Psr\Http\Message\StreamInterface; +use Psr\Http\Message\UploadedFileInterface; +use Psr\Http\Message\UriInterface; +use Symfony\Bridge\PsrHttpMessage\HttpFoundationFactoryInterface; +use Symfony\Component\HttpFoundation\Cookie; +use Symfony\Component\HttpFoundation\File\UploadedFile; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\StreamedResponse; + +/** + * {@inheritdoc} + * + * @author Kévin Dunglas + */ +class HttpFoundationFactory implements HttpFoundationFactoryInterface +{ + /** + * @var int The maximum output buffering size for each iteration when sending the response + */ + private $responseBufferMaxLength; + + public function __construct(int $responseBufferMaxLength = 16372) + { + $this->responseBufferMaxLength = $responseBufferMaxLength; + } + + /** + * {@inheritdoc} + */ + public function createRequest(ServerRequestInterface $psrRequest) + { + $server = []; + $uri = $psrRequest->getUri(); + + if ($uri instanceof UriInterface) { + $server['SERVER_NAME'] = $uri->getHost(); + $server['SERVER_PORT'] = $uri->getPort(); + $server['REQUEST_URI'] = $uri->getPath(); + $server['QUERY_STRING'] = $uri->getQuery(); + } + + $server['REQUEST_METHOD'] = $psrRequest->getMethod(); + + $server = array_replace($server, $psrRequest->getServerParams()); + + $parsedBody = $psrRequest->getParsedBody(); + $parsedBody = \is_array($parsedBody) ? $parsedBody : []; + + $request = new Request( + $psrRequest->getQueryParams(), + $parsedBody, + $psrRequest->getAttributes(), + $psrRequest->getCookieParams(), + $this->getFiles($psrRequest->getUploadedFiles()), + $server, + $psrRequest->getBody()->__toString() + ); + $request->headers->replace($psrRequest->getHeaders()); + + return $request; + } + + /** + * Converts to the input array to $_FILES structure. + * + * @param array $uploadedFiles + * + * @return array + */ + private function getFiles(array $uploadedFiles) + { + $files = []; + + foreach ($uploadedFiles as $key => $value) { + if ($value instanceof UploadedFileInterface) { + $files[$key] = $this->createUploadedFile($value); + } else { + $files[$key] = $this->getFiles($value); + } + } + + return $files; + } + + /** + * Creates Symfony UploadedFile instance from PSR-7 ones. + * + * @param UploadedFileInterface $psrUploadedFile + * + * @return UploadedFile + */ + private function createUploadedFile(UploadedFileInterface $psrUploadedFile) + { + $temporaryPath = ''; + $clientFileName = ''; + if (UPLOAD_ERR_NO_FILE !== $psrUploadedFile->getError()) { + $temporaryPath = $this->getTemporaryPath(); + $psrUploadedFile->moveTo($temporaryPath); + + $clientFileName = $psrUploadedFile->getClientFilename(); + } + + if (class_exists('Symfony\Component\HttpFoundation\HeaderUtils')) { + // Symfony 4.1+ + return new UploadedFile( + $temporaryPath, + null === $clientFileName ? '' : $clientFileName, + $psrUploadedFile->getClientMediaType(), + $psrUploadedFile->getError(), + true + ); + } + + return new UploadedFile( + $temporaryPath, + null === $clientFileName ? '' : $clientFileName, + $psrUploadedFile->getClientMediaType(), + $psrUploadedFile->getSize(), + $psrUploadedFile->getError(), + true + ); + } + + /** + * Gets a temporary file path. + * + * @return string + */ + protected function getTemporaryPath() + { + return tempnam(sys_get_temp_dir(), uniqid('symfony', true)); + } + + /** + * {@inheritdoc} + */ + public function createResponse(ResponseInterface $psrResponse, bool $streamed = false) + { + $cookies = $psrResponse->getHeader('Set-Cookie'); + $psrResponse = $psrResponse->withoutHeader('Set-Cookie'); + + if ($streamed) { + $response = new StreamedResponse( + $this->createStreamedResponseCallback($psrResponse->getBody()), + $psrResponse->getStatusCode(), + $psrResponse->getHeaders() + ); + } else { + $response = new Response( + $psrResponse->getBody()->__toString(), + $psrResponse->getStatusCode(), + $psrResponse->getHeaders() + ); + } + + $response->setProtocolVersion($psrResponse->getProtocolVersion()); + + foreach ($cookies as $cookie) { + $response->headers->setCookie($this->createCookie($cookie)); + } + + return $response; + } + + /** + * Creates a Cookie instance from a cookie string. + * + * Some snippets have been taken from the Guzzle project: https://github.com/guzzle/guzzle/blob/5.3/src/Cookie/SetCookie.php#L34 + * + * @param string $cookie + * + * @return Cookie + * + * @throws \InvalidArgumentException + */ + private function createCookie($cookie) + { + foreach (explode(';', $cookie) as $part) { + $part = trim($part); + + $data = explode('=', $part, 2); + $name = $data[0]; + $value = isset($data[1]) ? trim($data[1], " \n\r\t\0\x0B\"") : null; + + if (!isset($cookieName)) { + $cookieName = $name; + $cookieValue = $value; + + continue; + } + + if ('expires' === strtolower($name) && null !== $value) { + $cookieExpire = new \DateTime($value); + + continue; + } + + if ('path' === strtolower($name) && null !== $value) { + $cookiePath = $value; + + continue; + } + + if ('domain' === strtolower($name) && null !== $value) { + $cookieDomain = $value; + + continue; + } + + if ('secure' === strtolower($name)) { + $cookieSecure = true; + + continue; + } + + if ('httponly' === strtolower($name)) { + $cookieHttpOnly = true; + + continue; + } + + if ('samesite' === strtolower($name) && null !== $value) { + $samesite = $value; + + continue; + } + } + + if (!isset($cookieName)) { + throw new \InvalidArgumentException('The value of the Set-Cookie header is malformed.'); + } + + return new Cookie( + $cookieName, + $cookieValue, + isset($cookieExpire) ? $cookieExpire : 0, + isset($cookiePath) ? $cookiePath : '/', + isset($cookieDomain) ? $cookieDomain : null, + isset($cookieSecure), + isset($cookieHttpOnly), + false, + isset($samesite) ? $samesite : null + ); + } + + private function createStreamedResponseCallback(StreamInterface $body): callable + { + return function () use ($body) { + if ($body->isSeekable()) { + $body->rewind(); + } + + if (!$body->isReadable()) { + echo $body; + + return; + } + + while (!$body->eof()) { + echo $body->read($this->responseBufferMaxLength); + } + }; + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Factory/PsrHttpFactory.php b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Factory/PsrHttpFactory.php new file mode 100644 index 0000000..a37e1e9 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Factory/PsrHttpFactory.php @@ -0,0 +1,172 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\PsrHttpMessage\Factory; + +use Psr\Http\Message\ResponseFactoryInterface; +use Psr\Http\Message\ServerRequestFactoryInterface; +use Psr\Http\Message\StreamFactoryInterface; +use Psr\Http\Message\UploadedFileFactoryInterface; +use Psr\Http\Message\UploadedFileInterface; +use Symfony\Bridge\PsrHttpMessage\HttpMessageFactoryInterface; +use Symfony\Component\HttpFoundation\BinaryFileResponse; +use Symfony\Component\HttpFoundation\File\UploadedFile; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\StreamedResponse; + +/** + * Builds Psr\HttpMessage instances using a PSR-17 implementation. + * + * @author Antonio J. García Lagar + */ +class PsrHttpFactory implements HttpMessageFactoryInterface +{ + private $serverRequestFactory; + private $streamFactory; + private $uploadedFileFactory; + private $responseFactory; + + public function __construct(ServerRequestFactoryInterface $serverRequestFactory, StreamFactoryInterface $streamFactory, UploadedFileFactoryInterface $uploadedFileFactory, ResponseFactoryInterface $responseFactory) + { + $this->serverRequestFactory = $serverRequestFactory; + $this->streamFactory = $streamFactory; + $this->uploadedFileFactory = $uploadedFileFactory; + $this->responseFactory = $responseFactory; + } + + /** + * {@inheritdoc} + */ + public function createRequest(Request $symfonyRequest) + { + $request = $this->serverRequestFactory->createServerRequest( + $symfonyRequest->getMethod(), + $symfonyRequest->getUri(), + $symfonyRequest->server->all() + ); + + foreach ($symfonyRequest->headers->all() as $name => $value) { + $request = $request->withHeader($name, $value); + } + + $body = $this->streamFactory->createStreamFromResource($symfonyRequest->getContent(true)); + + $request = $request + ->withBody($body) + ->withUploadedFiles($this->getFiles($symfonyRequest->files->all())) + ->withCookieParams($symfonyRequest->cookies->all()) + ->withQueryParams($symfonyRequest->query->all()) + ->withParsedBody($symfonyRequest->request->all()) + ; + + foreach ($symfonyRequest->attributes->all() as $key => $value) { + $request = $request->withAttribute($key, $value); + } + + return $request; + } + + /** + * Converts Symfony uploaded files array to the PSR one. + * + * @param array $uploadedFiles + * + * @return array + */ + private function getFiles(array $uploadedFiles) + { + $files = []; + + foreach ($uploadedFiles as $key => $value) { + if (null === $value) { + $files[$key] = $this->uploadedFileFactory->createUploadedFile($this->streamFactory->createStream(), 0, UPLOAD_ERR_NO_FILE); + continue; + } + if ($value instanceof UploadedFile) { + $files[$key] = $this->createUploadedFile($value); + } else { + $files[$key] = $this->getFiles($value); + } + } + + return $files; + } + + /** + * Creates a PSR-7 UploadedFile instance from a Symfony one. + * + * @param UploadedFile $symfonyUploadedFile + * + * @return UploadedFileInterface + */ + private function createUploadedFile(UploadedFile $symfonyUploadedFile) + { + return $this->uploadedFileFactory->createUploadedFile( + $this->streamFactory->createStreamFromFile( + $symfonyUploadedFile->getRealPath() + ), + (int) $symfonyUploadedFile->getSize(), + $symfonyUploadedFile->getError(), + $symfonyUploadedFile->getClientOriginalName(), + $symfonyUploadedFile->getClientMimeType() + ); + } + + /** + * {@inheritdoc} + */ + public function createResponse(Response $symfonyResponse) + { + $response = $this->responseFactory->createResponse($symfonyResponse->getStatusCode(), Response::$statusTexts[$symfonyResponse->getStatusCode()] ?? ''); + + if ($symfonyResponse instanceof BinaryFileResponse) { + $stream = $this->streamFactory->createStreamFromFile( + $symfonyResponse->getFile()->getPathname() + ); + } else { + $stream = $this->streamFactory->createStreamFromFile('php://temp', 'wb+'); + if ($symfonyResponse instanceof StreamedResponse) { + ob_start(function ($buffer) use ($stream) { + $stream->write($buffer); + + return ''; + }); + + $symfonyResponse->sendContent(); + ob_end_clean(); + } else { + $stream->write($symfonyResponse->getContent()); + } + } + + $response = $response->withBody($stream); + + $headers = $symfonyResponse->headers->all(); + $cookies = $symfonyResponse->headers->getCookies(); + if (!empty($cookies)) { + $headers['Set-Cookie'] = []; + + foreach ($cookies as $cookie) { + $headers['Set-Cookie'][] = $cookie->__toString(); + } + } + + foreach ($headers as $name => $value) { + $response = $response->withHeader($name, $value); + } + + $protocolVersion = $symfonyResponse->getProtocolVersion(); + $response = $response->withProtocolVersion($protocolVersion); + + return $response; + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/HttpFoundationFactoryInterface.php b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/HttpFoundationFactoryInterface.php new file mode 100644 index 0000000..79ec40f --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/HttpFoundationFactoryInterface.php @@ -0,0 +1,43 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\PsrHttpMessage; + +use Psr\Http\Message\ResponseInterface; +use Psr\Http\Message\ServerRequestInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +/** + * Creates Symfony Request and Response instances from PSR-7 ones. + * + * @author Kévin Dunglas + */ +interface HttpFoundationFactoryInterface +{ + /** + * Creates a Symfony Request instance from a PSR-7 one. + * + * @param ServerRequestInterface $psrRequest + * + * @return Request + */ + public function createRequest(ServerRequestInterface $psrRequest); + + /** + * Creates a Symfony Response instance from a PSR-7 one. + * + * @param ResponseInterface $psrResponse + * + * @return Response + */ + public function createResponse(ResponseInterface $psrResponse); +} diff --git a/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/HttpMessageFactoryInterface.php b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/HttpMessageFactoryInterface.php new file mode 100644 index 0000000..b7960e8 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/HttpMessageFactoryInterface.php @@ -0,0 +1,43 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\PsrHttpMessage; + +use Psr\Http\Message\ResponseInterface; +use Psr\Http\Message\ServerRequestInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +/** + * Creates PSR HTTP Request and Response instances from Symfony ones. + * + * @author Kévin Dunglas + */ +interface HttpMessageFactoryInterface +{ + /** + * Creates a PSR-7 Request instance from a Symfony one. + * + * @param Request $symfonyRequest + * + * @return ServerRequestInterface + */ + public function createRequest(Request $symfonyRequest); + + /** + * Creates a PSR-7 Response instance from a Symfony one. + * + * @param Response $symfonyResponse + * + * @return ResponseInterface + */ + public function createResponse(Response $symfonyResponse); +} diff --git a/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/LICENSE b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/LICENSE new file mode 100644 index 0000000..12a7453 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2016 Fabien Potencier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/README.md b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/README.md new file mode 100644 index 0000000..87fbd43 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/README.md @@ -0,0 +1,20 @@ +PSR-7 Bridge +============ + +Provides integration for PSR7. + +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/psr7.html) + * [SensioFrameworkExtraBundle](https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/index.html#psr-7-support) + +Running the tests +----------------- + +If you want to run the unit tests, install dev dependencies before +running PHPUnit: + + $ cd path/to/Symfony/Bridge/PsrHttpMessage/ + $ composer.phar install + $ phpunit diff --git a/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Factory/AbstractHttpMessageFactoryTest.php b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Factory/AbstractHttpMessageFactoryTest.php new file mode 100644 index 0000000..4b8bb97 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Factory/AbstractHttpMessageFactoryTest.php @@ -0,0 +1,229 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\PsrHttpMessage\Tests\Factory; + +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\PsrHttpMessage\HttpMessageFactoryInterface; +use Symfony\Component\HttpFoundation\BinaryFileResponse; +use Symfony\Component\HttpFoundation\Cookie; +use Symfony\Component\HttpFoundation\File\UploadedFile; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\StreamedResponse; + +/** + * @author Kévin Dunglas + * @author Antonio J. García Lagar + */ +abstract class AbstractHttpMessageFactoryTest extends TestCase +{ + private $factory; + private $tmpDir; + + /** + * @return HttpMessageFactoryInterface + */ + abstract protected function buildHttpMessageFactory(); + + public function setup() + { + $this->factory = $this->buildHttpMessageFactory(); + $this->tmpDir = sys_get_temp_dir(); + } + + public function testCreateRequest() + { + $stdClass = new \stdClass(); + $request = new Request( + [ + 'bar' => ['baz' => '42'], + 'foo' => '1', + ], + [ + 'twitter' => [ + '@dunglas' => 'Kévin Dunglas', + '@coopTilleuls' => 'Les-Tilleuls.coop', + ], + 'baz' => '2', + ], + [ + 'a1' => $stdClass, + 'a2' => ['foo' => 'bar'], + ], + [ + 'c1' => 'foo', + 'c2' => ['c3' => 'bar'], + ], + [ + 'f1' => $this->createUploadedFile('F1', 'f1.txt', 'text/plain', UPLOAD_ERR_OK), + 'foo' => ['f2' => $this->createUploadedFile('F2', 'f2.txt', 'text/plain', UPLOAD_ERR_OK)], + ], + [ + 'REQUEST_METHOD' => 'POST', + 'HTTP_HOST' => 'dunglas.fr', + 'HTTP_X_SYMFONY' => '2.8', + 'REQUEST_URI' => '/testCreateRequest?bar[baz]=42&foo=1', + 'QUERY_STRING' => 'bar[baz]=42&foo=1', + ], + 'Content' + ); + + $psrRequest = $this->factory->createRequest($request); + + $this->assertEquals('Content', $psrRequest->getBody()->__toString()); + + $queryParams = $psrRequest->getQueryParams(); + $this->assertEquals('1', $queryParams['foo']); + $this->assertEquals('42', $queryParams['bar']['baz']); + + $requestTarget = $psrRequest->getRequestTarget(); + $this->assertEquals('/testCreateRequest?bar[baz]=42&foo=1', urldecode($requestTarget)); + + $parsedBody = $psrRequest->getParsedBody(); + $this->assertEquals('Kévin Dunglas', $parsedBody['twitter']['@dunglas']); + $this->assertEquals('Les-Tilleuls.coop', $parsedBody['twitter']['@coopTilleuls']); + $this->assertEquals('2', $parsedBody['baz']); + + $attributes = $psrRequest->getAttributes(); + $this->assertEquals($stdClass, $attributes['a1']); + $this->assertEquals('bar', $attributes['a2']['foo']); + + $cookies = $psrRequest->getCookieParams(); + $this->assertEquals('foo', $cookies['c1']); + $this->assertEquals('bar', $cookies['c2']['c3']); + + $uploadedFiles = $psrRequest->getUploadedFiles(); + $this->assertEquals('F1', $uploadedFiles['f1']->getStream()->__toString()); + $this->assertEquals('f1.txt', $uploadedFiles['f1']->getClientFilename()); + $this->assertEquals('text/plain', $uploadedFiles['f1']->getClientMediaType()); + $this->assertEquals(UPLOAD_ERR_OK, $uploadedFiles['f1']->getError()); + + $this->assertEquals('F2', $uploadedFiles['foo']['f2']->getStream()->__toString()); + $this->assertEquals('f2.txt', $uploadedFiles['foo']['f2']->getClientFilename()); + $this->assertEquals('text/plain', $uploadedFiles['foo']['f2']->getClientMediaType()); + $this->assertEquals(UPLOAD_ERR_OK, $uploadedFiles['foo']['f2']->getError()); + + $serverParams = $psrRequest->getServerParams(); + $this->assertEquals('POST', $serverParams['REQUEST_METHOD']); + $this->assertEquals('2.8', $serverParams['HTTP_X_SYMFONY']); + $this->assertEquals('POST', $psrRequest->getMethod()); + $this->assertEquals(['2.8'], $psrRequest->getHeader('X-Symfony')); + } + + public function testGetContentCanBeCalledAfterRequestCreation() + { + $header = ['HTTP_HOST' => 'dunglas.fr']; + $request = new Request([], [], [], [], [], $header, 'Content'); + + $psrRequest = $this->factory->createRequest($request); + + $this->assertEquals('Content', $psrRequest->getBody()->__toString()); + $this->assertEquals('Content', $request->getContent()); + } + + private function createUploadedFile($content, $originalName, $mimeType, $error) + { + $path = tempnam($this->tmpDir, uniqid()); + file_put_contents($path, $content); + + if (class_exists('Symfony\Component\HttpFoundation\HeaderUtils')) { + // Symfony 4.1+ + return new UploadedFile($path, $originalName, $mimeType, $error, true); + } + + return new UploadedFile($path, $originalName, $mimeType, filesize($path), $error, true); + } + + public function testCreateResponse() + { + $response = new Response( + 'Response content.', + 202, + ['X-Symfony' => ['3.4']] + ); + $response->headers->setCookie(new Cookie('city', 'Lille', new \DateTime('Wed, 13 Jan 2021 22:23:01 GMT'), '/', null, false, true, false, 'lax')); + + $psrResponse = $this->factory->createResponse($response); + $this->assertEquals('Response content.', $psrResponse->getBody()->__toString()); + $this->assertEquals(202, $psrResponse->getStatusCode()); + $this->assertEquals(['3.4'], $psrResponse->getHeader('X-Symfony')); + + $cookieHeader = $psrResponse->getHeader('Set-Cookie'); + $this->assertInternalType('array', $cookieHeader); + $this->assertCount(1, $cookieHeader); + $this->assertRegExp('{city=Lille; expires=Wed, 13-Jan-2021 22:23:01 GMT;( max-age=\d+;)? path=/; httponly}i', $cookieHeader[0]); + } + + public function testCreateResponseFromStreamed() + { + $response = new StreamedResponse(function () { + echo "Line 1\n"; + flush(); + + echo "Line 2\n"; + flush(); + }); + + $psrResponse = $this->factory->createResponse($response); + + $this->assertEquals("Line 1\nLine 2\n", $psrResponse->getBody()->__toString()); + } + + public function testCreateResponseFromBinaryFile() + { + $path = tempnam($this->tmpDir, uniqid()); + file_put_contents($path, 'Binary'); + + $response = new BinaryFileResponse($path); + + $psrResponse = $this->factory->createResponse($response); + + $this->assertEquals('Binary', $psrResponse->getBody()->__toString()); + } + + public function testUploadErrNoFile() + { + if (class_exists('Symfony\Component\HttpFoundation\HeaderUtils')) { + // Symfony 4.1+ + $file = new UploadedFile('', '', null, UPLOAD_ERR_NO_FILE, true); + } else { + $file = new UploadedFile('', '', null, 0, UPLOAD_ERR_NO_FILE, true); + } + $this->assertEquals(0, $file->getSize()); + $this->assertEquals(UPLOAD_ERR_NO_FILE, $file->getError()); + $this->assertFalse($file->getSize(), 'SplFile::getSize() returns false on error'); + + $request = new Request( + [], + [], + [], + [], + [ + 'f1' => $file, + 'f2' => ['name' => null, 'type' => null, 'tmp_name' => null, 'error' => UPLOAD_ERR_NO_FILE, 'size' => 0], + ], + [ + 'REQUEST_METHOD' => 'POST', + 'HTTP_HOST' => 'dunglas.fr', + 'HTTP_X_SYMFONY' => '2.8', + ], + 'Content' + ); + + $psrRequest = $this->factory->createRequest($request); + + $uploadedFiles = $psrRequest->getUploadedFiles(); + + $this->assertEquals(UPLOAD_ERR_NO_FILE, $uploadedFiles['f1']->getError()); + $this->assertEquals(UPLOAD_ERR_NO_FILE, $uploadedFiles['f2']->getError()); + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Factory/DiactorosFactoryTest.php b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Factory/DiactorosFactoryTest.php new file mode 100644 index 0000000..5ebe7a9 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Factory/DiactorosFactoryTest.php @@ -0,0 +1,32 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\PsrHttpMessage\Tests\Factory; + +use Symfony\Bridge\PsrHttpMessage\Factory\DiactorosFactory; + +/** + * @author Kévin Dunglas + * @author Antonio J. García Lagar + * + * @group legacy + */ +class DiactorosFactoryTest extends AbstractHttpMessageFactoryTest +{ + protected function buildHttpMessageFactory() + { + if (!class_exists('Zend\Diactoros\ServerRequestFactory')) { + $this->markTestSkipped('Zend Diactoros is not installed.'); + } + + return new DiactorosFactory(); + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Factory/HttpFoundationFactoryTest.php b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Factory/HttpFoundationFactoryTest.php new file mode 100644 index 0000000..27b84c0 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Factory/HttpFoundationFactoryTest.php @@ -0,0 +1,250 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\PsrHttpMessage\Tests\Factory; + +use PHPUnit\Framework\TestCase; +use Psr\Http\Message\UploadedFileInterface; +use Symfony\Bridge\PsrHttpMessage\Factory\HttpFoundationFactory; +use Symfony\Bridge\PsrHttpMessage\Tests\Fixtures\Response; +use Symfony\Bridge\PsrHttpMessage\Tests\Fixtures\ServerRequest; +use Symfony\Bridge\PsrHttpMessage\Tests\Fixtures\Stream; +use Symfony\Bridge\PsrHttpMessage\Tests\Fixtures\UploadedFile; +use Symfony\Bridge\PsrHttpMessage\Tests\Fixtures\Uri; +use Symfony\Component\HttpFoundation\Cookie; + +/** + * @author Kévin Dunglas + */ +class HttpFoundationFactoryTest extends TestCase +{ + /** @var HttpFoundationFactory */ + private $factory; + + /** @var string */ + private $tmpDir; + + public function setup() + { + $this->factory = new HttpFoundationFactory(); + $this->tmpDir = sys_get_temp_dir(); + } + + public function testCreateRequest() + { + $stdClass = new \stdClass(); + $serverRequest = new ServerRequest( + '1.1', + [ + 'X-Dunglas-API-Platform' => '1.0', + 'X-data' => ['a', 'b'], + ], + new Stream('The body'), + '/about/kevin', + 'GET', + 'http://les-tilleuls.coop/about/kevin', + ['country' => 'France'], + ['city' => 'Lille'], + ['url' => 'http://les-tilleuls.coop'], + [ + 'doc1' => $this->createUploadedFile('Doc 1', UPLOAD_ERR_OK, 'doc1.txt', 'text/plain'), + 'nested' => [ + 'docs' => [ + $this->createUploadedFile('Doc 2', UPLOAD_ERR_OK, 'doc2.txt', 'text/plain'), + $this->createUploadedFile('Doc 3', UPLOAD_ERR_OK, 'doc3.txt', 'text/plain'), + ], + ], + ], + ['url' => 'http://dunglas.fr'], + ['custom' => $stdClass] + ); + + $symfonyRequest = $this->factory->createRequest($serverRequest); + $files = $symfonyRequest->files->all(); + + $this->assertEquals('http://les-tilleuls.coop', $symfonyRequest->query->get('url')); + $this->assertEquals('doc1.txt', $files['doc1']->getClientOriginalName()); + $this->assertEquals('doc2.txt', $files['nested']['docs'][0]->getClientOriginalName()); + $this->assertEquals('doc3.txt', $files['nested']['docs'][1]->getClientOriginalName()); + $this->assertEquals('http://dunglas.fr', $symfonyRequest->request->get('url')); + $this->assertEquals($stdClass, $symfonyRequest->attributes->get('custom')); + $this->assertEquals('Lille', $symfonyRequest->cookies->get('city')); + $this->assertEquals('France', $symfonyRequest->server->get('country')); + $this->assertEquals('The body', $symfonyRequest->getContent()); + $this->assertEquals('1.0', $symfonyRequest->headers->get('X-Dunglas-API-Platform')); + $this->assertEquals(['a', 'b'], $symfonyRequest->headers->get('X-data', null, false)); + } + + public function testCreateRequestWithNullParsedBody() + { + $serverRequest = new ServerRequest( + '1.1', + [], + new Stream(), + '/', + 'GET', + null, + [], + [], + [], + [], + null, + [] + ); + + $this->assertCount(0, $this->factory->createRequest($serverRequest)->request); + } + + public function testCreateRequestWithObjectParsedBody() + { + $serverRequest = new ServerRequest( + '1.1', + [], + new Stream(), + '/', + 'GET', + null, + [], + [], + [], + [], + new \stdClass(), + [] + ); + + $this->assertCount(0, $this->factory->createRequest($serverRequest)->request); + } + + public function testCreateRequestWithUri() + { + $serverRequest = new ServerRequest( + '1.1', + [], + new Stream(), + '/', + 'GET', + new Uri('http://les-tilleuls.coop/about/kevin'), + [], + [], + [], + [], + null, + [] + ); + + $this->assertEquals('/about/kevin', $this->factory->createRequest($serverRequest)->getPathInfo()); + } + + public function testCreateUploadedFile() + { + $uploadedFile = $this->createUploadedFile('An uploaded file.', UPLOAD_ERR_OK, 'myfile.txt', 'text/plain'); + $symfonyUploadedFile = $this->callCreateUploadedFile($uploadedFile); + $size = $symfonyUploadedFile->getSize(); + + $uniqid = uniqid(); + $symfonyUploadedFile->move($this->tmpDir, $uniqid); + + $this->assertEquals($uploadedFile->getSize(), $size); + $this->assertEquals(UPLOAD_ERR_OK, $symfonyUploadedFile->getError()); + $this->assertEquals('myfile.txt', $symfonyUploadedFile->getClientOriginalName()); + $this->assertEquals('txt', $symfonyUploadedFile->getClientOriginalExtension()); + $this->assertEquals('text/plain', $symfonyUploadedFile->getClientMimeType()); + $this->assertEquals('An uploaded file.', file_get_contents($this->tmpDir.'/'.$uniqid)); + } + + /** + * @expectedException \Symfony\Component\HttpFoundation\File\Exception\FileException + * @expectedExceptionMessage The file "e" could not be written on disk. + */ + public function testCreateUploadedFileWithError() + { + $uploadedFile = $this->createUploadedFile('Error.', UPLOAD_ERR_CANT_WRITE, 'e', 'text/plain'); + $symfonyUploadedFile = $this->callCreateUploadedFile($uploadedFile); + + $this->assertEquals(UPLOAD_ERR_CANT_WRITE, $symfonyUploadedFile->getError()); + + $symfonyUploadedFile->move($this->tmpDir, 'shouldFail.txt'); + } + + private function createUploadedFile($content, $error, $clientFileName, $clientMediaType) + { + $filePath = tempnam($this->tmpDir, uniqid()); + file_put_contents($filePath, $content); + + return new UploadedFile($filePath, filesize($filePath), $error, $clientFileName, $clientMediaType); + } + + private function callCreateUploadedFile(UploadedFileInterface $uploadedFile) + { + $reflection = new \ReflectionClass($this->factory); + $createUploadedFile = $reflection->getMethod('createUploadedFile'); + $createUploadedFile->setAccessible(true); + + return $createUploadedFile->invokeArgs($this->factory, [$uploadedFile]); + } + + public function testCreateResponse() + { + $response = new Response( + '1.0', + [ + 'X-Symfony' => ['2.8'], + 'Set-Cookie' => [ + 'theme=light', + 'test', + 'ABC=AeD; Domain=dunglas.fr; Path=/kevin; Expires=Wed, 13 Jan 2021 22:23:01 GMT; Secure; HttpOnly; SameSite=Strict', + ], + ], + new Stream('The response body'), + 200 + ); + + $symfonyResponse = $this->factory->createResponse($response); + + $this->assertEquals('1.0', $symfonyResponse->getProtocolVersion()); + $this->assertEquals('2.8', $symfonyResponse->headers->get('X-Symfony')); + + $cookies = $symfonyResponse->headers->getCookies(); + $this->assertEquals('theme', $cookies[0]->getName()); + $this->assertEquals('light', $cookies[0]->getValue()); + $this->assertEquals(0, $cookies[0]->getExpiresTime()); + $this->assertNull($cookies[0]->getDomain()); + $this->assertEquals('/', $cookies[0]->getPath()); + $this->assertFalse($cookies[0]->isSecure()); + $this->assertFalse($cookies[0]->isHttpOnly()); + + $this->assertEquals('test', $cookies[1]->getName()); + $this->assertNull($cookies[1]->getValue()); + + $this->assertEquals('ABC', $cookies[2]->getName()); + $this->assertEquals('AeD', $cookies[2]->getValue()); + $this->assertEquals(strtotime('Wed, 13 Jan 2021 22:23:01 GMT'), $cookies[2]->getExpiresTime()); + $this->assertEquals('dunglas.fr', $cookies[2]->getDomain()); + $this->assertEquals('/kevin', $cookies[2]->getPath()); + $this->assertTrue($cookies[2]->isSecure()); + $this->assertTrue($cookies[2]->isHttpOnly()); + if (\defined('Symfony\Component\HttpFoundation\Cookie::SAMESITE_STRICT')) { + $this->assertEquals(Cookie::SAMESITE_STRICT, $cookies[2]->getSameSite()); + } + + $this->assertEquals('The response body', $symfonyResponse->getContent()); + $this->assertEquals(200, $symfonyResponse->getStatusCode()); + + $symfonyResponse = $this->factory->createResponse($response, true); + + ob_start(); + $symfonyResponse->sendContent(); + $sentContent = ob_get_clean(); + + $this->assertEquals('The response body', $sentContent); + $this->assertEquals(200, $symfonyResponse->getStatusCode()); + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Factory/PsrHttpFactoryTest.php b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Factory/PsrHttpFactoryTest.php new file mode 100644 index 0000000..da12ea7 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Factory/PsrHttpFactoryTest.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\PsrHttpMessage\Tests\Factory; + +use Nyholm\Psr7\Factory\Psr17Factory; +use Symfony\Bridge\PsrHttpMessage\Factory\PsrHttpFactory; + +/** + * @author Kévin Dunglas + * @author Antonio J. García Lagar + */ +class PsrHttpFactoryTest extends AbstractHttpMessageFactoryTest +{ + protected function buildHttpMessageFactory() + { + $factory = new Psr17Factory(); + + return new PsrHttpFactory($factory, $factory, $factory, $factory); + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Fixtures/Message.php b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Fixtures/Message.php new file mode 100644 index 0000000..0cda6fc --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Fixtures/Message.php @@ -0,0 +1,93 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\PsrHttpMessage\Tests\Fixtures; + +use Psr\Http\Message\MessageInterface; +use Psr\Http\Message\StreamInterface; + +/** + * Message. + * + * @author Kévin Dunglas + */ +class Message implements MessageInterface +{ + private $version = '1.1'; + private $headers = []; + private $body; + + public function __construct($version = '1.1', array $headers = [], StreamInterface $body = null) + { + $this->version = $version; + $this->headers = $headers; + $this->body = null === $body ? new Stream() : $body; + } + + public function getProtocolVersion() + { + return $this->version; + } + + public function withProtocolVersion($version) + { + throw new \BadMethodCallException('Not implemented.'); + } + + public function getHeaders() + { + return $this->headers; + } + + public function hasHeader($name) + { + return isset($this->headers[$name]); + } + + public function getHeader($name) + { + return $this->hasHeader($name) ? $this->headers[$name] : []; + } + + public function getHeaderLine($name) + { + return $this->hasHeader($name) ? implode(',', $this->headers[$name]) : ''; + } + + public function withHeader($name, $value) + { + $this->headers[$name] = (array) $value; + + return $this; + } + + public function withAddedHeader($name, $value) + { + throw new \BadMethodCallException('Not implemented.'); + } + + public function withoutHeader($name) + { + unset($this->headers[$name]); + + return $this; + } + + public function getBody() + { + return $this->body; + } + + public function withBody(StreamInterface $body) + { + throw new \BadMethodCallException('Not implemented.'); + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Fixtures/Response.php b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Fixtures/Response.php new file mode 100644 index 0000000..a890792 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Fixtures/Response.php @@ -0,0 +1,45 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\PsrHttpMessage\Tests\Fixtures; + +use Psr\Http\Message\ResponseInterface; +use Psr\Http\Message\StreamInterface; + +/** + * @author Kévin Dunglas + */ +class Response extends Message implements ResponseInterface +{ + private $statusCode; + + public function __construct($version = '1.1', array $headers = [], StreamInterface $body = null, $statusCode = 200) + { + parent::__construct($version, $headers, $body); + + $this->statusCode = $statusCode; + } + + public function getStatusCode() + { + return $this->statusCode; + } + + public function withStatus($code, $reasonPhrase = '') + { + throw new \BadMethodCallException('Not implemented.'); + } + + public function getReasonPhrase() + { + throw new \BadMethodCallException('Not implemented.'); + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Fixtures/ServerRequest.php b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Fixtures/ServerRequest.php new file mode 100644 index 0000000..88ec984 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Fixtures/ServerRequest.php @@ -0,0 +1,141 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\PsrHttpMessage\Tests\Fixtures; + +use Psr\Http\Message\ServerRequestInterface; +use Psr\Http\Message\StreamInterface; +use Psr\Http\Message\UriInterface; + +/** + * @author Kévin Dunglas + */ +class ServerRequest extends Message implements ServerRequestInterface +{ + private $requestTarget; + private $method; + private $uri; + private $server; + private $cookies; + private $query; + private $uploadedFiles; + private $data; + private $attributes; + + public function __construct($version = '1.1', array $headers = [], StreamInterface $body = null, $requestTarget = '/', $method = 'GET', $uri = null, array $server = [], array $cookies = [], array $query = [], array $uploadedFiles = [], $data = null, array $attributes = []) + { + parent::__construct($version, $headers, $body); + + $this->requestTarget = $requestTarget; + $this->method = $method; + $this->uri = $uri; + $this->server = $server; + $this->cookies = $cookies; + $this->query = $query; + $this->uploadedFiles = $uploadedFiles; + $this->data = $data; + $this->attributes = $attributes; + } + + public function getRequestTarget() + { + return $this->requestTarget; + } + + public function withRequestTarget($requestTarget) + { + throw new \BadMethodCallException('Not implemented.'); + } + + public function getMethod() + { + return $this->method; + } + + public function withMethod($method) + { + } + + public function getUri() + { + return $this->uri; + } + + public function withUri(UriInterface $uri, $preserveHost = false) + { + throw new \BadMethodCallException('Not implemented.'); + } + + public function getServerParams() + { + return $this->server; + } + + public function getCookieParams() + { + return $this->cookies; + } + + public function withCookieParams(array $cookies) + { + throw new \BadMethodCallException('Not implemented.'); + } + + public function getQueryParams() + { + return $this->query; + } + + public function withQueryParams(array $query) + { + throw new \BadMethodCallException('Not implemented.'); + } + + public function getUploadedFiles() + { + return $this->uploadedFiles; + } + + public function withUploadedFiles(array $uploadedFiles) + { + throw new \BadMethodCallException('Not implemented.'); + } + + public function getParsedBody() + { + return $this->data; + } + + public function withParsedBody($data) + { + throw new \BadMethodCallException('Not implemented.'); + } + + public function getAttributes() + { + return $this->attributes; + } + + public function getAttribute($name, $default = null) + { + return isset($this->attributes[$name]) ? $this->attributes[$name] : $default; + } + + public function withAttribute($name, $value) + { + throw new \BadMethodCallException('Not implemented.'); + } + + public function withoutAttribute($name) + { + throw new \BadMethodCallException('Not implemented.'); + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Fixtures/Stream.php b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Fixtures/Stream.php new file mode 100644 index 0000000..aa0ba24 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Fixtures/Stream.php @@ -0,0 +1,99 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\PsrHttpMessage\Tests\Fixtures; + +use Psr\Http\Message\StreamInterface; + +/** + * @author Kévin Dunglas + */ +class Stream implements StreamInterface +{ + private $stringContent; + private $eof = true; + + public function __construct($stringContent = '') + { + $this->stringContent = $stringContent; + } + + public function __toString() + { + return $this->stringContent; + } + + public function close() + { + } + + public function detach() + { + } + + public function getSize() + { + } + + public function tell() + { + return 0; + } + + public function eof() + { + return $this->eof; + } + + public function isSeekable() + { + return true; + } + + public function seek($offset, $whence = SEEK_SET) + { + } + + public function rewind() + { + $this->eof = false; + } + + public function isWritable() + { + return false; + } + + public function write($string) + { + } + + public function isReadable() + { + return true; + } + + public function read($length) + { + $this->eof = true; + + return $this->stringContent; + } + + public function getContents() + { + return $this->stringContent; + } + + public function getMetadata($key = null) + { + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Fixtures/UploadedFile.php b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Fixtures/UploadedFile.php new file mode 100644 index 0000000..4cfa98b --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Fixtures/UploadedFile.php @@ -0,0 +1,65 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\PsrHttpMessage\Tests\Fixtures; + +use Psr\Http\Message\UploadedFileInterface; + +/** + * @author Kévin Dunglas + */ +class UploadedFile implements UploadedFileInterface +{ + private $filePath; + private $size; + private $error; + private $clientFileName; + private $clientMediaType; + + public function __construct($filePath, $size = null, $error = UPLOAD_ERR_OK, $clientFileName = null, $clientMediaType = null) + { + $this->filePath = $filePath; + $this->size = $size; + $this->error = $error; + $this->clientFileName = $clientFileName; + $this->clientMediaType = $clientMediaType; + } + + public function getStream() + { + throw new \RuntimeException('No stream is available.'); + } + + public function moveTo($targetPath) + { + rename($this->filePath, $targetPath); + } + + public function getSize() + { + return $this->size; + } + + public function getError() + { + return $this->error; + } + + public function getClientFilename() + { + return $this->clientFileName; + } + + public function getClientMediaType() + { + return $this->clientMediaType; + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Fixtures/Uri.php b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Fixtures/Uri.php new file mode 100644 index 0000000..f11c7e5 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Fixtures/Uri.php @@ -0,0 +1,135 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\PsrHttpMessage\Tests\Fixtures; + +use Psr\Http\Message\UriInterface; + +/** + * @author Rougin Royce Gutib + */ +class Uri implements UriInterface +{ + private $scheme = ''; + private $userInfo = ''; + private $host = ''; + private $port; + private $path = ''; + private $query = ''; + private $fragment = ''; + private $uriString; + + public function __construct($uri = '') + { + $parts = parse_url($uri); + + $this->scheme = isset($parts['scheme']) ? $parts['scheme'] : ''; + $this->userInfo = isset($parts['user']) ? $parts['user'] : ''; + $this->host = isset($parts['host']) ? $parts['host'] : ''; + $this->port = isset($parts['port']) ? $parts['port'] : null; + $this->path = isset($parts['path']) ? $parts['path'] : ''; + $this->query = isset($parts['query']) ? $parts['query'] : ''; + $this->fragment = isset($parts['fragment']) ? $parts['fragment'] : ''; + $this->uriString = $uri; + } + + public function getScheme() + { + return $this->scheme; + } + + public function getAuthority() + { + if (empty($this->host)) { + return ''; + } + + $authority = $this->host; + + if (!empty($this->userInfo)) { + $authority = $this->userInfo.'@'.$authority; + } + + $authority .= ':'.$this->port; + + return $authority; + } + + public function getUserInfo() + { + return $this->userInfo; + } + + public function getHost() + { + return $this->host; + } + + public function getPort() + { + return $this->port; + } + + public function getPath() + { + return $this->path; + } + + public function getQuery() + { + return $this->query; + } + + public function getFragment() + { + return $this->fragment; + } + + public function withScheme($scheme) + { + throw new \BadMethodCallException('Not implemented.'); + } + + public function withUserInfo($user, $password = null) + { + throw new \BadMethodCallException('Not implemented.'); + } + + public function withHost($host) + { + throw new \BadMethodCallException('Not implemented.'); + } + + public function withPort($port) + { + throw new \BadMethodCallException('Not implemented.'); + } + + public function withPath($path) + { + throw new \BadMethodCallException('Not implemented.'); + } + + public function withQuery($query) + { + throw new \BadMethodCallException('Not implemented.'); + } + + public function withFragment($fragment) + { + throw new \BadMethodCallException('Not implemented.'); + } + + public function __toString() + { + return $this->uriString; + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Functional/CovertTest.php b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Functional/CovertTest.php new file mode 100644 index 0000000..33ec34f --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/Tests/Functional/CovertTest.php @@ -0,0 +1,239 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\PsrHttpMessage\Tests\Functional; + +use Nyholm\Psr7\Factory\Psr17Factory; +use Nyholm\Psr7\Response as Psr7Response; +use Nyholm\Psr7\ServerRequest as Psr7Request; +use Nyholm\Psr7\Stream as Psr7Stream; +use PHPUnit\Framework\TestCase; +use Psr\Http\Message\ResponseInterface; +use Psr\Http\Message\ServerRequestInterface; +use Symfony\Bridge\PsrHttpMessage\Factory\HttpFoundationFactory; +use Symfony\Bridge\PsrHttpMessage\Factory\PsrHttpFactory; +use Symfony\Bridge\PsrHttpMessage\HttpFoundationFactoryInterface; +use Symfony\Bridge\PsrHttpMessage\HttpMessageFactoryInterface; +use Symfony\Component\HttpFoundation\Cookie; +use Symfony\Component\HttpFoundation\File\UploadedFile; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +/** + * Test to convert a request/response back and forth to make sure we do not loose data. + * + * @author Tobias Nyholm + */ +class CovertTest extends TestCase +{ + private $tmpDir; + + public function setup() + { + if (!class_exists('Nyholm\Psr7\ServerRequest')) { + $this->markTestSkipped('nyholm/psr7 is not installed.'); + } + + $this->tmpDir = sys_get_temp_dir(); + } + + /** + * @dataProvider requestProvider + * + * @param Request|ServerRequestInterface $request + * @param HttpFoundationFactoryInterface|HttpMessageFactoryInterface $firstFactory + * @param HttpFoundationFactoryInterface|HttpMessageFactoryInterface $secondFactory + */ + public function testConvertRequestMultipleTimes($request, $firstFactory, $secondFactory) + { + $temporaryRequest = $firstFactory->createRequest($request); + $finalRequest = $secondFactory->createRequest($temporaryRequest); + + if ($finalRequest instanceof Request) { + $this->assertEquals($request->getBasePath(), $finalRequest->getBasePath()); + $this->assertEquals($request->getBaseUrl(), $finalRequest->getBaseUrl()); + $this->assertEquals($request->getContent(), $finalRequest->getContent()); + $this->assertEquals($request->getEncodings(), $finalRequest->getEncodings()); + $this->assertEquals($request->getETags(), $finalRequest->getETags()); + $this->assertEquals($request->getHost(), $finalRequest->getHost()); + $this->assertEquals($request->getHttpHost(), $finalRequest->getHttpHost()); + $this->assertEquals($request->getMethod(), $finalRequest->getMethod()); + $this->assertEquals($request->getPassword(), $finalRequest->getPassword()); + $this->assertEquals($request->getPathInfo(), $finalRequest->getPathInfo()); + $this->assertEquals($request->getPort(), $finalRequest->getPort()); + $this->assertEquals($request->getProtocolVersion(), $finalRequest->getProtocolVersion()); + $this->assertEquals($request->getQueryString(), $finalRequest->getQueryString()); + $this->assertEquals($request->getRequestUri(), $finalRequest->getRequestUri()); + $this->assertEquals($request->getScheme(), $finalRequest->getScheme()); + $this->assertEquals($request->getSchemeAndHttpHost(), $finalRequest->getSchemeAndHttpHost()); + $this->assertEquals($request->getScriptName(), $finalRequest->getScriptName()); + $this->assertEquals($request->getUri(), $finalRequest->getUri()); + $this->assertEquals($request->getUser(), $finalRequest->getUser()); + $this->assertEquals($request->getUserInfo(), $finalRequest->getUserInfo()); + } elseif ($finalRequest instanceof ServerRequestInterface) { + $strToLower = function ($arr) { + foreach ($arr as $key => $value) { + yield strtolower($key) => $value; + } + }; + $this->assertEquals($request->getAttributes(), $finalRequest->getAttributes()); + $this->assertEquals($request->getCookieParams(), $finalRequest->getCookieParams()); + $this->assertEquals((array) $request->getParsedBody(), (array) $finalRequest->getParsedBody()); + $this->assertEquals($request->getQueryParams(), $finalRequest->getQueryParams()); + // PSR7 does not define a "withServerParams" so this is impossible to implement without knowing the PSR7 implementation. + //$this->assertEquals($request->getServerParams(), $finalRequest->getServerParams()); + $this->assertEquals($request->getUploadedFiles(), $finalRequest->getUploadedFiles()); + $this->assertEquals($request->getMethod(), $finalRequest->getMethod()); + $this->assertEquals($request->getRequestTarget(), $finalRequest->getRequestTarget()); + $this->assertEquals((string) $request->getUri(), (string) $finalRequest->getUri()); + $this->assertEquals((string) $request->getBody(), (string) $finalRequest->getBody()); + $this->assertEquals($strToLower($request->getHeaders()), $strToLower($finalRequest->getHeaders())); + $this->assertEquals($request->getProtocolVersion(), $finalRequest->getProtocolVersion()); + } else { + $this->fail('$finalRequest must be an instance of PSR7 or a HTTPFoundation request'); + } + } + + public function requestProvider() + { + $sfRequest = new Request( + [ + 'foo' => '1', + 'bar' => ['baz' => '42'], + ], + [ + 'twitter' => [ + '@dunglas' => 'Kévin Dunglas', + '@coopTilleuls' => 'Les-Tilleuls.coop', + ], + 'baz' => '2', + ], + [ + 'a2' => ['foo' => 'bar'], + ], + [ + 'c1' => 'foo', + 'c2' => ['c3' => 'bar'], + ], + [ + 'f1' => $this->createUploadedFile('F1', 'f1.txt', 'text/plain', UPLOAD_ERR_OK), + 'foo' => ['f2' => $this->createUploadedFile('F2', 'f2.txt', 'text/plain', UPLOAD_ERR_OK)], + ], + [ + 'REQUEST_METHOD' => 'POST', + 'HTTP_HOST' => 'dunglas.fr', + 'SERVER_NAME' => 'dunglas.fr', + 'SERVER_PORT' => null, + 'HTTP_X_SYMFONY' => '2.8', + 'REQUEST_URI' => '/testCreateRequest?bar[baz]=42&foo=1', + 'QUERY_STRING' => 'foo=1&bar[baz]=42', + ], + 'Content' + ); + + $psr7Request = (new Psr7Request('POST', 'http://tnyholm.se/foo/?bar=biz')) + ->withQueryParams(['bar' => 'biz']); + + $nyholmFactory = new Psr17Factory(); + $psr17Factory = new PsrHttpFactory($nyholmFactory, $nyholmFactory, $nyholmFactory, $nyholmFactory); + $symfonyFactory = new HttpFoundationFactory(); + + return [ + [$sfRequest, $psr17Factory, $symfonyFactory], + [$psr7Request, $symfonyFactory, $psr17Factory], + ]; + } + + /** + * @dataProvider responseProvider + * + * @param Response|ResponseInterface $response + * @param HttpFoundationFactoryInterface|HttpMessageFactoryInterface $firstFactory + * @param HttpFoundationFactoryInterface|HttpMessageFactoryInterface $secondFactory + */ + public function testConvertResponseMultipleTimes($response, $firstFactory, $secondFactory) + { + $temporaryResponse = $firstFactory->createResponse($response); + $finalResponse = $secondFactory->createResponse($temporaryResponse); + + if ($finalResponse instanceof Response) { + $this->assertEquals($response->getAge(), $finalResponse->getAge()); + $this->assertEquals($response->getCharset(), $finalResponse->getCharset()); + $this->assertEquals($response->getContent(), $finalResponse->getContent()); + $this->assertEquals($response->getDate(), $finalResponse->getDate()); + $this->assertEquals($response->getEtag(), $finalResponse->getEtag()); + $this->assertEquals($response->getExpires(), $finalResponse->getExpires()); + $this->assertEquals($response->getLastModified(), $finalResponse->getLastModified()); + $this->assertEquals($response->getMaxAge(), $finalResponse->getMaxAge()); + $this->assertEquals($response->getProtocolVersion(), $finalResponse->getProtocolVersion()); + $this->assertEquals($response->getStatusCode(), $finalResponse->getStatusCode()); + $this->assertEquals($response->getTtl(), $finalResponse->getTtl()); + } elseif ($finalResponse instanceof ResponseInterface) { + $strToLower = function ($arr) { + foreach ($arr as $key => $value) { + yield strtolower($key) => $value; + } + }; + $this->assertEquals($response->getStatusCode(), $finalResponse->getStatusCode()); + $this->assertEquals($response->getReasonPhrase(), $finalResponse->getReasonPhrase()); + $this->assertEquals((string) $response->getBody(), (string) $finalResponse->getBody()); + $this->assertEquals($strToLower($response->getHeaders()), $strToLower($finalResponse->getHeaders())); + $this->assertEquals($response->getProtocolVersion(), $finalResponse->getProtocolVersion()); + } else { + $this->fail('$finalResponse must be an instance of PSR7 or a HTTPFoundation response'); + } + } + + public function responseProvider() + { + $sfResponse = new Response( + 'Response content.', + 202, + ['x-symfony' => ['3.4']] + ); + + if (method_exists(Cookie::class, 'create')) { + $cookie = Cookie::create('city', 'Lille', new \DateTime('Wed, 13 Jan 2021 22:23:01 GMT')); + } else { + $cookie = new Cookie('city', 'Lille', new \DateTime('Wed, 13 Jan 2021 22:23:01 GMT')); + } + + $sfResponse->headers->setCookie($cookie); + $body = Psr7Stream::create(); + $status = 302; + $headers = [ + 'location' => ['http://example.com/'], + ]; + $zendResponse = new Psr7Response($status, $headers, $body); + + $nyholmFactory = new Psr17Factory(); + $psr17Factory = new PsrHttpFactory($nyholmFactory, $nyholmFactory, $nyholmFactory, $nyholmFactory); + $symfonyFactory = new HttpFoundationFactory(); + + return [ + [$sfResponse, $psr17Factory, $symfonyFactory], + [$zendResponse, $symfonyFactory, $psr17Factory], + ]; + } + + private function createUploadedFile($content, $originalName, $mimeType, $error) + { + $path = tempnam($this->tmpDir, uniqid()); + file_put_contents($path, $content); + + if (class_exists('Symfony\Component\HttpFoundation\HeaderUtils')) { + // Symfony 4.1+ + return new UploadedFile($path, $originalName, $mimeType, $error, true); + } + + return new UploadedFile($path, $originalName, $mimeType, filesize($path), $error, true); + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/composer.json b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/composer.json new file mode 100644 index 0000000..51bb655 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/composer.json @@ -0,0 +1,42 @@ +{ + "name": "symfony/psr-http-message-bridge", + "type": "symfony-bridge", + "description": "PSR HTTP message bridge", + "keywords": ["http", "psr-7", "psr-17", "http-message"], + "homepage": "http://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + } + ], + "require": { + "php": "^7.1", + "psr/http-message": "^1.0", + "symfony/http-foundation": "^3.4 || ^4.0" + }, + "require-dev": { + "symfony/phpunit-bridge": "^3.4.20 || ^4.0", + "nyholm/psr7": "^1.1", + "zendframework/zend-diactoros": "^1.4.1 || ^2.0" + }, + "suggest": { + "nyholm/psr7": "For a super lightweight PSR-7/17 implementation" + }, + "autoload": { + "psr-4": { "Symfony\\Bridge\\PsrHttpMessage\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/phpunit.xml.dist b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/phpunit.xml.dist new file mode 100644 index 0000000..9a6e477 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/psr-http-message-bridge/phpunit.xml.dist @@ -0,0 +1,30 @@ + + + + + + ./Tests/ + + + + + + ./ + + ./Resources + ./Tests + ./vendor + + + + diff --git a/addons/weliam_smartcity/vendor/symfony/service-contracts/LICENSE b/addons/weliam_smartcity/vendor/symfony/service-contracts/LICENSE new file mode 100644 index 0000000..3f853aa --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/service-contracts/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2018-2019 Fabien Potencier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/addons/weliam_smartcity/vendor/symfony/service-contracts/README.md b/addons/weliam_smartcity/vendor/symfony/service-contracts/README.md new file mode 100644 index 0000000..d033a43 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/service-contracts/README.md @@ -0,0 +1,9 @@ +Symfony Service Contracts +========================= + +A set of abstractions extracted out of the Symfony components. + +Can be used to build on semantics that the Symfony components proved useful - and +that already have battle tested implementations. + +See https://github.com/symfony/contracts/blob/master/README.md for more information. diff --git a/addons/weliam_smartcity/vendor/symfony/service-contracts/ResetInterface.php b/addons/weliam_smartcity/vendor/symfony/service-contracts/ResetInterface.php new file mode 100644 index 0000000..1af1075 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/service-contracts/ResetInterface.php @@ -0,0 +1,30 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Contracts\Service; + +/** + * Provides a way to reset an object to its initial state. + * + * When calling the "reset()" method on an object, it should be put back to its + * initial state. This usually means clearing any internal buffers and forwarding + * the call to internal dependencies. All properties of the object should be put + * back to the same state it had when it was first ready to use. + * + * This method could be called, for example, to recycle objects that are used as + * services, so that they can be used to handle several requests in the same + * process loop (note that we advise making your services stateless instead of + * implementing this interface when possible.) + */ +interface ResetInterface +{ + public function reset(); +} diff --git a/addons/weliam_smartcity/vendor/symfony/service-contracts/ServiceLocatorTrait.php b/addons/weliam_smartcity/vendor/symfony/service-contracts/ServiceLocatorTrait.php new file mode 100644 index 0000000..4ec6eb4 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/service-contracts/ServiceLocatorTrait.php @@ -0,0 +1,122 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Contracts\Service; + +use Psr\Container\ContainerExceptionInterface; +use Psr\Container\NotFoundExceptionInterface; + +/** + * A trait to help implement ServiceProviderInterface. + * + * @author Robin Chalas + * @author Nicolas Grekas + */ +trait ServiceLocatorTrait +{ + private $factories; + private $loading = []; + private $providedTypes; + + /** + * @param callable[] $factories + */ + public function __construct(array $factories) + { + $this->factories = $factories; + } + + /** + * {@inheritdoc} + * + * @return bool + */ + public function has($id) + { + return isset($this->factories[$id]); + } + + /** + * {@inheritdoc} + */ + public function get($id) + { + if (!isset($this->factories[$id])) { + throw $this->createNotFoundException($id); + } + + if (isset($this->loading[$id])) { + $ids = array_values($this->loading); + $ids = \array_slice($this->loading, array_search($id, $ids)); + $ids[] = $id; + + throw $this->createCircularReferenceException($id, $ids); + } + + $this->loading[$id] = $id; + try { + return $this->factories[$id]($this); + } finally { + unset($this->loading[$id]); + } + } + + /** + * {@inheritdoc} + */ + public function getProvidedServices(): array + { + if (null === $this->providedTypes) { + $this->providedTypes = []; + + foreach ($this->factories as $name => $factory) { + if (!\is_callable($factory)) { + $this->providedTypes[$name] = '?'; + } else { + $type = (new \ReflectionFunction($factory))->getReturnType(); + + $this->providedTypes[$name] = $type ? ($type->allowsNull() ? '?' : '').$type->getName() : '?'; + } + } + } + + return $this->providedTypes; + } + + private function createNotFoundException(string $id): NotFoundExceptionInterface + { + if (!$alternatives = array_keys($this->factories)) { + $message = 'is empty...'; + } else { + $last = array_pop($alternatives); + if ($alternatives) { + $message = sprintf('only knows about the "%s" and "%s" services.', implode('", "', $alternatives), $last); + } else { + $message = sprintf('only knows about the "%s" service.', $last); + } + } + + if ($this->loading) { + $message = sprintf('The service "%s" has a dependency on a non-existent service "%s". This locator %s', end($this->loading), $id, $message); + } else { + $message = sprintf('Service "%s" not found: the current service locator %s', $id, $message); + } + + return new class($message) extends \InvalidArgumentException implements NotFoundExceptionInterface { + }; + } + + private function createCircularReferenceException(string $id, array $path): ContainerExceptionInterface + { + return new class(sprintf('Circular reference detected for service "%s", path: "%s".', $id, implode(' -> ', $path))) extends \RuntimeException implements ContainerExceptionInterface { + }; + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/service-contracts/ServiceProviderInterface.php b/addons/weliam_smartcity/vendor/symfony/service-contracts/ServiceProviderInterface.php new file mode 100644 index 0000000..c60ad0b --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/service-contracts/ServiceProviderInterface.php @@ -0,0 +1,36 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Contracts\Service; + +use Psr\Container\ContainerInterface; + +/** + * A ServiceProviderInterface exposes the identifiers and the types of services provided by a container. + * + * @author Nicolas Grekas + * @author Mateusz Sip + */ +interface ServiceProviderInterface extends ContainerInterface +{ + /** + * Returns an associative array of service types keyed by the identifiers provided by the current container. + * + * Examples: + * + * * ['logger' => 'Psr\Log\LoggerInterface'] means the object provides a service named "logger" that implements Psr\Log\LoggerInterface + * * ['foo' => '?'] means the container provides service name "foo" of unspecified type + * * ['bar' => '?Bar\Baz'] means the container provides a service "bar" of type Bar\Baz|null + * + * @return string[] The provided service types, keyed by service names + */ + public function getProvidedServices(): array; +} diff --git a/addons/weliam_smartcity/vendor/symfony/service-contracts/ServiceSubscriberInterface.php b/addons/weliam_smartcity/vendor/symfony/service-contracts/ServiceSubscriberInterface.php new file mode 100644 index 0000000..8bb320f --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/service-contracts/ServiceSubscriberInterface.php @@ -0,0 +1,53 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Contracts\Service; + +/** + * A ServiceSubscriber exposes its dependencies via the static {@link getSubscribedServices} method. + * + * The getSubscribedServices method returns an array of service types required by such instances, + * optionally keyed by the service names used internally. Service types that start with an interrogation + * mark "?" are optional, while the other ones are mandatory service dependencies. + * + * The injected service locators SHOULD NOT allow access to any other services not specified by the method. + * + * It is expected that ServiceSubscriber instances consume PSR-11-based service locators internally. + * This interface does not dictate any injection method for these service locators, although constructor + * injection is recommended. + * + * @author Nicolas Grekas + */ +interface ServiceSubscriberInterface +{ + /** + * Returns an array of service types required by such instances, optionally keyed by the service names used internally. + * + * For mandatory dependencies: + * + * * ['logger' => 'Psr\Log\LoggerInterface'] means the objects use the "logger" name + * internally to fetch a service which must implement Psr\Log\LoggerInterface. + * * ['loggers' => 'Psr\Log\LoggerInterface[]'] means the objects use the "loggers" name + * internally to fetch an iterable of Psr\Log\LoggerInterface instances. + * * ['Psr\Log\LoggerInterface'] is a shortcut for + * * ['Psr\Log\LoggerInterface' => 'Psr\Log\LoggerInterface'] + * + * otherwise: + * + * * ['logger' => '?Psr\Log\LoggerInterface'] denotes an optional dependency + * * ['loggers' => '?Psr\Log\LoggerInterface[]'] denotes an optional iterable dependency + * * ['?Psr\Log\LoggerInterface'] is a shortcut for + * * ['Psr\Log\LoggerInterface' => '?Psr\Log\LoggerInterface'] + * + * @return array The required service types, optionally keyed by service names + */ + public static function getSubscribedServices(); +} diff --git a/addons/weliam_smartcity/vendor/symfony/service-contracts/ServiceSubscriberTrait.php b/addons/weliam_smartcity/vendor/symfony/service-contracts/ServiceSubscriberTrait.php new file mode 100644 index 0000000..2bd57fd --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/service-contracts/ServiceSubscriberTrait.php @@ -0,0 +1,63 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Contracts\Service; + +use Psr\Container\ContainerInterface; + +/** + * Implementation of ServiceSubscriberInterface that determines subscribed services from + * private method return types. Service ids are available as "ClassName::methodName". + * + * @author Kevin Bond + */ +trait ServiceSubscriberTrait +{ + /** @var ContainerInterface */ + private $container; + + public static function getSubscribedServices(): array + { + static $services; + + if (null !== $services) { + return $services; + } + + $services = \is_callable(['parent', __FUNCTION__]) ? parent::getSubscribedServices() : []; + + foreach ((new \ReflectionClass(self::class))->getMethods() as $method) { + if ($method->isStatic() || $method->isAbstract() || $method->isGenerator() || $method->isInternal() || $method->getNumberOfRequiredParameters()) { + continue; + } + + if (self::class === $method->getDeclaringClass()->name && ($returnType = $method->getReturnType()) && !$returnType->isBuiltin()) { + $services[self::class.'::'.$method->name] = '?'.$returnType->getName(); + } + } + + return $services; + } + + /** + * @required + */ + public function setContainer(ContainerInterface $container) + { + $this->container = $container; + + if (\is_callable(['parent', __FUNCTION__])) { + return parent::setContainer($container); + } + + return null; + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/service-contracts/Test/ServiceLocatorTest.php b/addons/weliam_smartcity/vendor/symfony/service-contracts/Test/ServiceLocatorTest.php new file mode 100644 index 0000000..408c017 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/service-contracts/Test/ServiceLocatorTest.php @@ -0,0 +1,92 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Contracts\Service\Test; + +use PHPUnit\Framework\TestCase; +use Psr\Container\ContainerInterface; +use Symfony\Contracts\Service\ServiceLocatorTrait; + +class ServiceLocatorTest extends TestCase +{ + public function getServiceLocator(array $factories) + { + return new class($factories) implements ContainerInterface { + use ServiceLocatorTrait; + }; + } + + public function testHas() + { + $locator = $this->getServiceLocator([ + 'foo' => function () { return 'bar'; }, + 'bar' => function () { return 'baz'; }, + function () { return 'dummy'; }, + ]); + + $this->assertTrue($locator->has('foo')); + $this->assertTrue($locator->has('bar')); + $this->assertFalse($locator->has('dummy')); + } + + public function testGet() + { + $locator = $this->getServiceLocator([ + 'foo' => function () { return 'bar'; }, + 'bar' => function () { return 'baz'; }, + ]); + + $this->assertSame('bar', $locator->get('foo')); + $this->assertSame('baz', $locator->get('bar')); + } + + public function testGetDoesNotMemoize() + { + $i = 0; + $locator = $this->getServiceLocator([ + 'foo' => function () use (&$i) { + ++$i; + + return 'bar'; + }, + ]); + + $this->assertSame('bar', $locator->get('foo')); + $this->assertSame('bar', $locator->get('foo')); + $this->assertSame(2, $i); + } + + public function testThrowsOnUndefinedInternalService() + { + if (!$this->getExpectedException()) { + $this->expectException('Psr\Container\NotFoundExceptionInterface'); + $this->expectExceptionMessage('The service "foo" has a dependency on a non-existent service "bar". This locator only knows about the "foo" service.'); + } + $locator = $this->getServiceLocator([ + 'foo' => function () use (&$locator) { return $locator->get('bar'); }, + ]); + + $locator->get('foo'); + } + + public function testThrowsOnCircularReference() + { + $this->expectException('Psr\Container\ContainerExceptionInterface'); + $this->expectExceptionMessage('Circular reference detected for service "bar", path: "bar -> baz -> bar".'); + $locator = $this->getServiceLocator([ + 'foo' => function () use (&$locator) { return $locator->get('bar'); }, + 'bar' => function () use (&$locator) { return $locator->get('baz'); }, + 'baz' => function () use (&$locator) { return $locator->get('bar'); }, + ]); + + $locator->get('foo'); + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/service-contracts/composer.json b/addons/weliam_smartcity/vendor/symfony/service-contracts/composer.json new file mode 100644 index 0000000..f4209cc --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/service-contracts/composer.json @@ -0,0 +1,34 @@ +{ + "name": "symfony/service-contracts", + "type": "library", + "description": "Generic abstractions related to writing services", + "keywords": ["abstractions", "contracts", "decoupling", "interfaces", "interoperability", "standards"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": "^7.1.3", + "psr/container": "^1.0" + }, + "suggest": { + "symfony/service-implementation": "" + }, + "autoload": { + "psr-4": { "Symfony\\Contracts\\Service\\": "" } + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/var-exporter/.gitignore b/addons/weliam_smartcity/vendor/symfony/var-exporter/.gitignore new file mode 100644 index 0000000..5414c2c --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/var-exporter/.gitignore @@ -0,0 +1,3 @@ +composer.lock +phpunit.xml +vendor/ diff --git a/addons/weliam_smartcity/vendor/symfony/var-exporter/CHANGELOG.md b/addons/weliam_smartcity/vendor/symfony/var-exporter/CHANGELOG.md new file mode 100644 index 0000000..9aa4a8b --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/var-exporter/CHANGELOG.md @@ -0,0 +1,7 @@ +CHANGELOG +========= + +4.2.0 +----- + + * added the component diff --git a/addons/weliam_smartcity/vendor/symfony/var-exporter/Exception/ClassNotFoundException.php b/addons/weliam_smartcity/vendor/symfony/var-exporter/Exception/ClassNotFoundException.php new file mode 100644 index 0000000..4cebe44 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/var-exporter/Exception/ClassNotFoundException.php @@ -0,0 +1,20 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarExporter\Exception; + +class ClassNotFoundException extends \Exception implements ExceptionInterface +{ + public function __construct(string $class, \Throwable $previous = null) + { + parent::__construct(sprintf('Class "%s" not found.', $class), 0, $previous); + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/var-exporter/Exception/ExceptionInterface.php b/addons/weliam_smartcity/vendor/symfony/var-exporter/Exception/ExceptionInterface.php new file mode 100644 index 0000000..adfaed4 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/var-exporter/Exception/ExceptionInterface.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarExporter\Exception; + +interface ExceptionInterface extends \Throwable +{ +} diff --git a/addons/weliam_smartcity/vendor/symfony/var-exporter/Exception/NotInstantiableTypeException.php b/addons/weliam_smartcity/vendor/symfony/var-exporter/Exception/NotInstantiableTypeException.php new file mode 100644 index 0000000..7ca4884 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/var-exporter/Exception/NotInstantiableTypeException.php @@ -0,0 +1,20 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarExporter\Exception; + +class NotInstantiableTypeException extends \Exception implements ExceptionInterface +{ + public function __construct(string $type) + { + parent::__construct(sprintf('Type "%s" is not instantiable.', $type)); + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/var-exporter/Instantiator.php b/addons/weliam_smartcity/vendor/symfony/var-exporter/Instantiator.php new file mode 100644 index 0000000..06abbc7 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/var-exporter/Instantiator.php @@ -0,0 +1,94 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarExporter; + +use Symfony\Component\VarExporter\Exception\ExceptionInterface; +use Symfony\Component\VarExporter\Exception\NotInstantiableTypeException; +use Symfony\Component\VarExporter\Internal\Hydrator; +use Symfony\Component\VarExporter\Internal\Registry; + +/** + * A utility class to create objects without calling their constructor. + * + * @author Nicolas Grekas + */ +final class Instantiator +{ + /** + * Creates an object and sets its properties without calling its constructor nor any other methods. + * + * For example: + * + * // creates an empty instance of Foo + * Instantiator::instantiate(Foo::class); + * + * // creates a Foo instance and sets one of its properties + * Instantiator::instantiate(Foo::class, ['propertyName' => $propertyValue]); + * + * // creates a Foo instance and sets a private property defined on its parent Bar class + * Instantiator::instantiate(Foo::class, [], [ + * Bar::class => ['privateBarProperty' => $propertyValue], + * ]); + * + * Instances of ArrayObject, ArrayIterator and SplObjectHash can be created + * by using the special "\0" property name to define their internal value: + * + * // creates an SplObjectHash where $info1 is attached to $obj1, etc. + * Instantiator::instantiate(SplObjectStorage::class, ["\0" => [$obj1, $info1, $obj2, $info2...]]); + * + * // creates an ArrayObject populated with $inputArray + * Instantiator::instantiate(ArrayObject::class, ["\0" => [$inputArray]]); + * + * @param string $class The class of the instance to create + * @param array $properties The properties to set on the instance + * @param array $privateProperties The private properties to set on the instance, + * keyed by their declaring class + * + * @return object The created instance + * + * @throws ExceptionInterface When the instance cannot be created + */ + public static function instantiate(string $class, array $properties = [], array $privateProperties = []) + { + $reflector = Registry::$reflectors[$class] ?? Registry::getClassReflector($class); + + if (Registry::$cloneable[$class]) { + $wrappedInstance = [clone Registry::$prototypes[$class]]; + } elseif (Registry::$instantiableWithoutConstructor[$class]) { + $wrappedInstance = [$reflector->newInstanceWithoutConstructor()]; + } elseif (null === Registry::$prototypes[$class]) { + throw new NotInstantiableTypeException($class); + } elseif ($reflector->implementsInterface('Serializable') && (\PHP_VERSION_ID < 70400 || !method_exists($class, '__unserialize'))) { + $wrappedInstance = [unserialize('C:'.\strlen($class).':"'.$class.'":0:{}')]; + } else { + $wrappedInstance = [unserialize('O:'.\strlen($class).':"'.$class.'":0:{}')]; + } + + if ($properties) { + $privateProperties[$class] = isset($privateProperties[$class]) ? $properties + $privateProperties[$class] : $properties; + } + + foreach ($privateProperties as $class => $properties) { + if (!$properties) { + continue; + } + foreach ($properties as $name => $value) { + // because they're also used for "unserialization", hydrators + // deal with array of instances, so we need to wrap values + $properties[$name] = [$value]; + } + (Hydrator::$hydrators[$class] ?? Hydrator::getHydrator($class))($properties, $wrappedInstance); + } + + return $wrappedInstance[0]; + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/var-exporter/Internal/Exporter.php b/addons/weliam_smartcity/vendor/symfony/var-exporter/Internal/Exporter.php new file mode 100644 index 0000000..c0b7fa1 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/var-exporter/Internal/Exporter.php @@ -0,0 +1,406 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarExporter\Internal; + +use Symfony\Component\VarExporter\Exception\NotInstantiableTypeException; + +/** + * @author Nicolas Grekas + * + * @internal + */ +class Exporter +{ + /** + * Prepares an array of values for VarExporter. + * + * For performance this method is public and has no type-hints. + * + * @param array &$values + * @param \SplObjectStorage $objectsPool + * @param array &$refsPool + * @param int &$objectsCount + * @param bool &$valuesAreStatic + * + * @return int + * + * @throws NotInstantiableTypeException When a value cannot be serialized + */ + public static function prepare($values, $objectsPool, &$refsPool, &$objectsCount, &$valuesAreStatic) + { + $refs = $values; + foreach ($values as $k => $value) { + if (\is_resource($value)) { + throw new NotInstantiableTypeException(get_resource_type($value).' resource'); + } + $refs[$k] = $objectsPool; + + if ($isRef = !$valueIsStatic = $values[$k] !== $objectsPool) { + $values[$k] = &$value; // Break hard references to make $values completely + unset($value); // independent from the original structure + $refs[$k] = $value = $values[$k]; + if ($value instanceof Reference && 0 > $value->id) { + $valuesAreStatic = false; + ++$value->count; + continue; + } + $refsPool[] = [&$refs[$k], $value, &$value]; + $refs[$k] = $values[$k] = new Reference(-\count($refsPool), $value); + } + + if (\is_array($value)) { + if ($value) { + $value = self::prepare($value, $objectsPool, $refsPool, $objectsCount, $valueIsStatic); + } + goto handle_value; + } elseif (!\is_object($value) && !$value instanceof \__PHP_Incomplete_Class) { + goto handle_value; + } + + $valueIsStatic = false; + if (isset($objectsPool[$value])) { + ++$objectsCount; + $value = new Reference($objectsPool[$value][0]); + goto handle_value; + } + + $class = \get_class($value); + $reflector = Registry::$reflectors[$class] ?? Registry::getClassReflector($class); + + if ($reflector->hasMethod('__serialize')) { + if (!$reflector->getMethod('__serialize')->isPublic()) { + throw new \Error(sprintf('Call to %s method %s::__serialize()', $reflector->getMethod('__serialize')->isProtected() ? 'protected' : 'private', $class)); + } + + if (!\is_array($properties = $value->__serialize())) { + throw new \Typerror($class.'::__serialize() must return an array'); + } + + goto prepare_value; + } + + $properties = []; + $sleep = null; + $arrayValue = (array) $value; + $proto = Registry::$prototypes[$class]; + + if (($value instanceof \ArrayIterator || $value instanceof \ArrayObject) && null !== $proto) { + // ArrayIterator and ArrayObject need special care because their "flags" + // option changes the behavior of the (array) casting operator. + $properties = self::getArrayObjectProperties($value, $arrayValue, $proto); + + // populates Registry::$prototypes[$class] with a new instance + Registry::getClassReflector($class, Registry::$instantiableWithoutConstructor[$class], Registry::$cloneable[$class]); + } elseif ($value instanceof \SplObjectStorage && Registry::$cloneable[$class] && null !== $proto) { + // By implementing Serializable, SplObjectStorage breaks + // internal references; let's deal with it on our own. + foreach (clone $value as $v) { + $properties[] = $v; + $properties[] = $value[$v]; + } + $properties = ['SplObjectStorage' => ["\0" => $properties]]; + } elseif ($value instanceof \Serializable || $value instanceof \__PHP_Incomplete_Class) { + ++$objectsCount; + $objectsPool[$value] = [$id = \count($objectsPool), serialize($value), [], 0]; + $value = new Reference($id); + goto handle_value; + } + + if (method_exists($class, '__sleep')) { + if (!\is_array($sleep = $value->__sleep())) { + trigger_error('serialize(): __sleep should return an array only containing the names of instance-variables to serialize', E_USER_NOTICE); + $value = null; + goto handle_value; + } + foreach ($sleep as $name) { + if (property_exists($value, $name) && !$reflector->hasProperty($name)) { + $arrayValue[$name] = $value->$name; + } + } + $sleep = array_flip($sleep); + } + + $proto = (array) $proto; + + foreach ($arrayValue as $name => $v) { + $i = 0; + $n = (string) $name; + if ('' === $n || "\0" !== $n[0]) { + $c = 'stdClass'; + } elseif ('*' === $n[1]) { + $n = substr($n, 3); + $c = $reflector->getProperty($n)->class; + if ('Error' === $c) { + $c = 'TypeError'; + } elseif ('Exception' === $c) { + $c = 'ErrorException'; + } + } else { + $i = strpos($n, "\0", 2); + $c = substr($n, 1, $i - 1); + $n = substr($n, 1 + $i); + } + if (null !== $sleep) { + if (!isset($sleep[$n]) || ($i && $c !== $class)) { + continue; + } + $sleep[$n] = false; + } + if (!\array_key_exists($name, $proto) || $proto[$name] !== $v || "\x00Error\x00trace" === $name || "\x00Exception\x00trace" === $name) { + $properties[$c][$n] = $v; + } + } + if ($sleep) { + foreach ($sleep as $n => $v) { + if (false !== $v) { + trigger_error(sprintf('serialize(): "%s" returned as member variable from __sleep() but does not exist', $n), E_USER_NOTICE); + } + } + } + + prepare_value: + $objectsPool[$value] = [$id = \count($objectsPool)]; + $properties = self::prepare($properties, $objectsPool, $refsPool, $objectsCount, $valueIsStatic); + ++$objectsCount; + $objectsPool[$value] = [$id, $class, $properties, method_exists($class, '__unserialize') ? -$objectsCount : (method_exists($class, '__wakeup') ? $objectsCount : 0)]; + + $value = new Reference($id); + + handle_value: + if ($isRef) { + unset($value); // Break the hard reference created above + } elseif (!$valueIsStatic) { + $values[$k] = $value; + } + $valuesAreStatic = $valueIsStatic && $valuesAreStatic; + } + + return $values; + } + + public static function export($value, $indent = '') + { + switch (true) { + case \is_int($value) || \is_float($value): return var_export($value, true); + case [] === $value: return '[]'; + case false === $value: return 'false'; + case true === $value: return 'true'; + case null === $value: return 'null'; + case '' === $value: return "''"; + } + + if ($value instanceof Reference) { + if (0 <= $value->id) { + return '$o['.$value->id.']'; + } + if (!$value->count) { + return self::export($value->value, $indent); + } + $value = -$value->id; + + return '&$r['.$value.']'; + } + $subIndent = $indent.' '; + + if (\is_string($value)) { + $code = var_export($value, true); + + if (false !== strpos($value, "\n") || false !== strpos($value, "\r")) { + $code = strtr($code, [ + "\r\n" => "'.\"\\r\\n\"\n".$subIndent.".'", + "\r" => "'.\"\\r\"\n".$subIndent.".'", + "\n" => "'.\"\\n\"\n".$subIndent.".'", + ]); + } + + if (false !== strpos($value, "\0")) { + $code = str_replace('\' . "\0" . \'', '\'."\0".\'', $code); + $code = str_replace('".\'\'."', '', $code); + } + + if (false !== strpos($code, "''.")) { + $code = str_replace("''.", '', $code); + } + + if (".''" === substr($code, -3)) { + $code = rtrim(substr($code, 0, -3)); + } + + return $code; + } + + if (\is_array($value)) { + $j = -1; + $code = ''; + foreach ($value as $k => $v) { + $code .= $subIndent; + if (!\is_int($k) || 1 !== $k - $j) { + $code .= self::export($k, $subIndent).' => '; + } + if (\is_int($k) && $k > $j) { + $j = $k; + } + $code .= self::export($v, $subIndent).",\n"; + } + + return "[\n".$code.$indent.']'; + } + + if ($value instanceof Values) { + $code = $subIndent."\$r = [],\n"; + foreach ($value->values as $k => $v) { + $code .= $subIndent.'$r['.$k.'] = '.self::export($v, $subIndent).",\n"; + } + + return "[\n".$code.$indent.']'; + } + + if ($value instanceof Registry) { + return self::exportRegistry($value, $indent, $subIndent); + } + + if ($value instanceof Hydrator) { + return self::exportHydrator($value, $indent, $subIndent); + } + + throw new \UnexpectedValueException(sprintf('Cannot export value of type "%s".', \is_object($value) ? \get_class($value) : \gettype($value))); + } + + private static function exportRegistry(Registry $value, string $indent, string $subIndent): string + { + $code = ''; + $serializables = []; + $seen = []; + $prototypesAccess = 0; + $factoriesAccess = 0; + $r = '\\'.Registry::class; + $j = -1; + + foreach ($value as $k => $class) { + if (':' === ($class[1] ?? null)) { + $serializables[$k] = $class; + continue; + } + if (!Registry::$instantiableWithoutConstructor[$class]) { + if (is_subclass_of($class, 'Serializable') && !method_exists($class, '__unserialize')) { + $serializables[$k] = 'C:'.\strlen($class).':"'.$class.'":0:{}'; + } else { + $serializables[$k] = 'O:'.\strlen($class).':"'.$class.'":0:{}'; + } + if (is_subclass_of($class, 'Throwable')) { + $eol = is_subclass_of($class, 'Error') ? "\0Error\0" : "\0Exception\0"; + $serializables[$k] = substr_replace($serializables[$k], '1:{s:'.(5 + \strlen($eol)).':"'.$eol.'trace";a:0:{}}', -4); + } + continue; + } + $code .= $subIndent.(1 !== $k - $j ? $k.' => ' : ''); + $j = $k; + $eol = ",\n"; + $c = '['.self::export($class).']'; + + if ($seen[$class] ?? false) { + if (Registry::$cloneable[$class]) { + ++$prototypesAccess; + $code .= 'clone $p'.$c; + } else { + ++$factoriesAccess; + $code .= '$f'.$c.'()'; + } + } else { + $seen[$class] = true; + if (Registry::$cloneable[$class]) { + $code .= 'clone ('.($prototypesAccess++ ? '$p' : '($p = &'.$r.'::$prototypes)').$c.' ?? '.$r.'::p'; + } else { + $code .= '('.($factoriesAccess++ ? '$f' : '($f = &'.$r.'::$factories)').$c.' ?? '.$r.'::f'; + $eol = '()'.$eol; + } + $code .= '('.substr($c, 1, -1).'))'; + } + $code .= $eol; + } + + if (1 === $prototypesAccess) { + $code = str_replace('($p = &'.$r.'::$prototypes)', $r.'::$prototypes', $code); + } + if (1 === $factoriesAccess) { + $code = str_replace('($f = &'.$r.'::$factories)', $r.'::$factories', $code); + } + if ('' !== $code) { + $code = "\n".$code.$indent; + } + + if ($serializables) { + $code = $r.'::unserialize(['.$code.'], '.self::export($serializables, $indent).')'; + } else { + $code = '['.$code.']'; + } + + return '$o = '.$code; + } + + private static function exportHydrator(Hydrator $value, string $indent, string $subIndent): string + { + $code = ''; + foreach ($value->properties as $class => $properties) { + $code .= $subIndent.' '.self::export($class).' => '.self::export($properties, $subIndent.' ').",\n"; + } + + $code = [ + self::export($value->registry, $subIndent), + self::export($value->values, $subIndent), + '' !== $code ? "[\n".$code.$subIndent.']' : '[]', + self::export($value->value, $subIndent), + self::export($value->wakeups, $subIndent), + ]; + + return '\\'.\get_class($value)."::hydrate(\n".$subIndent.implode(",\n".$subIndent, $code)."\n".$indent.')'; + } + + /** + * @param \ArrayIterator|\ArrayObject $value + * @param \ArrayIterator|\ArrayObject $proto + */ + private static function getArrayObjectProperties($value, array &$arrayValue, $proto): array + { + $reflector = $value instanceof \ArrayIterator ? 'ArrayIterator' : 'ArrayObject'; + $reflector = Registry::$reflectors[$reflector] ?? Registry::getClassReflector($reflector); + + $properties = [ + $arrayValue, + $reflector->getMethod('getFlags')->invoke($value), + $value instanceof \ArrayObject ? $reflector->getMethod('getIteratorClass')->invoke($value) : 'ArrayIterator', + ]; + + $reflector = $reflector->getMethod('setFlags'); + $reflector->invoke($proto, \ArrayObject::STD_PROP_LIST); + + if ($properties[1] & \ArrayObject::STD_PROP_LIST) { + $reflector->invoke($value, 0); + $properties[0] = (array) $value; + } else { + $reflector->invoke($value, \ArrayObject::STD_PROP_LIST); + $arrayValue = (array) $value; + } + $reflector->invoke($value, $properties[1]); + + if ([[], 0, 'ArrayIterator'] === $properties) { + $properties = []; + } else { + if ('ArrayIterator' === $properties[2]) { + unset($properties[2]); + } + $properties = [$reflector->class => ["\0" => $properties]]; + } + + return $properties; + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/var-exporter/Internal/Hydrator.php b/addons/weliam_smartcity/vendor/symfony/var-exporter/Internal/Hydrator.php new file mode 100644 index 0000000..364d292 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/var-exporter/Internal/Hydrator.php @@ -0,0 +1,151 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarExporter\Internal; + +use Symfony\Component\VarExporter\Exception\ClassNotFoundException; + +/** + * @author Nicolas Grekas + * + * @internal + */ +class Hydrator +{ + public static $hydrators = []; + + public $registry; + public $values; + public $properties; + public $value; + public $wakeups; + + public function __construct(?Registry $registry, ?Values $values, array $properties, $value, array $wakeups) + { + $this->registry = $registry; + $this->values = $values; + $this->properties = $properties; + $this->value = $value; + $this->wakeups = $wakeups; + } + + public static function hydrate($objects, $values, $properties, $value, $wakeups) + { + foreach ($properties as $class => $vars) { + (self::$hydrators[$class] ?? self::getHydrator($class))($vars, $objects); + } + foreach ($wakeups as $k => $v) { + if (\is_array($v)) { + $objects[-$k]->__unserialize($v); + } else { + $objects[$v]->__wakeup(); + } + } + + return $value; + } + + public static function getHydrator($class) + { + if ('stdClass' === $class) { + return self::$hydrators[$class] = static function ($properties, $objects) { + foreach ($properties as $name => $values) { + foreach ($values as $i => $v) { + $objects[$i]->$name = $v; + } + } + }; + } + + if (!class_exists($class) && !interface_exists($class, false) && !trait_exists($class, false)) { + throw new ClassNotFoundException($class); + } + $classReflector = new \ReflectionClass($class); + + if (!$classReflector->isInternal()) { + return self::$hydrators[$class] = (self::$hydrators['stdClass'] ?? self::getHydrator('stdClass'))->bindTo(null, $class); + } + + if ($classReflector->name !== $class) { + return self::$hydrators[$classReflector->name] ?? self::getHydrator($classReflector->name); + } + + switch ($class) { + case 'ArrayIterator': + case 'ArrayObject': + $constructor = \Closure::fromCallable([$classReflector->getConstructor(), 'invokeArgs']); + + return self::$hydrators[$class] = static function ($properties, $objects) use ($constructor) { + foreach ($properties as $name => $values) { + if ("\0" !== $name) { + foreach ($values as $i => $v) { + $objects[$i]->$name = $v; + } + } + } + foreach ($properties["\0"] ?? [] as $i => $v) { + $constructor($objects[$i], $v); + } + }; + + case 'ErrorException': + return self::$hydrators[$class] = (self::$hydrators['stdClass'] ?? self::getHydrator('stdClass'))->bindTo(null, new class() extends \ErrorException { + }); + + case 'TypeError': + return self::$hydrators[$class] = (self::$hydrators['stdClass'] ?? self::getHydrator('stdClass'))->bindTo(null, new class() extends \Error { + }); + + case 'SplObjectStorage': + return self::$hydrators[$class] = static function ($properties, $objects) { + foreach ($properties as $name => $values) { + if ("\0" === $name) { + foreach ($values as $i => $v) { + for ($j = 0; $j < \count($v); ++$j) { + $objects[$i]->attach($v[$j], $v[++$j]); + } + } + continue; + } + foreach ($values as $i => $v) { + $objects[$i]->$name = $v; + } + } + }; + } + + $propertySetters = []; + foreach ($classReflector->getProperties() as $propertyReflector) { + if (!$propertyReflector->isStatic()) { + $propertyReflector->setAccessible(true); + $propertySetters[$propertyReflector->name] = \Closure::fromCallable([$propertyReflector, 'setValue']); + } + } + + if (!$propertySetters) { + return self::$hydrators[$class] = self::$hydrators['stdClass'] ?? self::getHydrator('stdClass'); + } + + return self::$hydrators[$class] = static function ($properties, $objects) use ($propertySetters) { + foreach ($properties as $name => $values) { + if ($setValue = $propertySetters[$name] ?? null) { + foreach ($values as $i => $v) { + $setValue($objects[$i], $v); + } + continue; + } + foreach ($values as $i => $v) { + $objects[$i]->$name = $v; + } + } + }; + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/var-exporter/Internal/Reference.php b/addons/weliam_smartcity/vendor/symfony/var-exporter/Internal/Reference.php new file mode 100644 index 0000000..e371c07 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/var-exporter/Internal/Reference.php @@ -0,0 +1,30 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarExporter\Internal; + +/** + * @author Nicolas Grekas + * + * @internal + */ +class Reference +{ + public $id; + public $value; + public $count = 0; + + public function __construct(int $id, $value = null) + { + $this->id = $id; + $this->value = $value; + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/var-exporter/Internal/Registry.php b/addons/weliam_smartcity/vendor/symfony/var-exporter/Internal/Registry.php new file mode 100644 index 0000000..19d91c9 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/var-exporter/Internal/Registry.php @@ -0,0 +1,136 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarExporter\Internal; + +use Symfony\Component\VarExporter\Exception\ClassNotFoundException; +use Symfony\Component\VarExporter\Exception\NotInstantiableTypeException; + +/** + * @author Nicolas Grekas + * + * @internal + */ +class Registry +{ + public static $reflectors = []; + public static $prototypes = []; + public static $factories = []; + public static $cloneable = []; + public static $instantiableWithoutConstructor = []; + + public function __construct(array $classes) + { + foreach ($classes as $i => $class) { + $this->$i = $class; + } + } + + public static function unserialize($objects, $serializables) + { + $unserializeCallback = ini_set('unserialize_callback_func', __CLASS__.'::getClassReflector'); + + try { + foreach ($serializables as $k => $v) { + $objects[$k] = unserialize($v); + } + } finally { + ini_set('unserialize_callback_func', $unserializeCallback); + } + + return $objects; + } + + public static function p($class) + { + self::getClassReflector($class, true, true); + + return self::$prototypes[$class]; + } + + public static function f($class) + { + $reflector = self::$reflectors[$class] ?? self::getClassReflector($class, true, false); + + return self::$factories[$class] = \Closure::fromCallable([$reflector, 'newInstanceWithoutConstructor']); + } + + public static function getClassReflector($class, $instantiableWithoutConstructor = false, $cloneable = null) + { + if (!($isClass = class_exists($class)) && !interface_exists($class, false) && !trait_exists($class, false)) { + throw new ClassNotFoundException($class); + } + $reflector = new \ReflectionClass($class); + + if ($instantiableWithoutConstructor) { + $proto = $reflector->newInstanceWithoutConstructor(); + } elseif (!$isClass || $reflector->isAbstract()) { + throw new NotInstantiableTypeException($class); + } elseif ($reflector->name !== $class) { + $reflector = self::$reflectors[$name = $reflector->name] ?? self::getClassReflector($name, false, $cloneable); + self::$cloneable[$class] = self::$cloneable[$name]; + self::$instantiableWithoutConstructor[$class] = self::$instantiableWithoutConstructor[$name]; + self::$prototypes[$class] = self::$prototypes[$name]; + + return self::$reflectors[$class] = $reflector; + } else { + try { + $proto = $reflector->newInstanceWithoutConstructor(); + $instantiableWithoutConstructor = true; + } catch (\ReflectionException $e) { + $proto = $reflector->implementsInterface('Serializable') && !method_exists($class, '__unserialize') ? 'C:' : 'O:'; + if ('C:' === $proto && !$reflector->getMethod('unserialize')->isInternal()) { + $proto = null; + } elseif (false === $proto = @unserialize($proto.\strlen($class).':"'.$class.'":0:{}')) { + throw new NotInstantiableTypeException($class); + } + } + if (null !== $proto && !$proto instanceof \Throwable && !$proto instanceof \Serializable && !method_exists($class, '__sleep') && (\PHP_VERSION_ID < 70400 || !method_exists($class, '__serialize'))) { + try { + serialize($proto); + } catch (\Exception $e) { + throw new NotInstantiableTypeException($class, $e); + } + } + } + + if (null === $cloneable) { + if (($proto instanceof \Reflector || $proto instanceof \ReflectionGenerator || $proto instanceof \ReflectionType || $proto instanceof \IteratorIterator || $proto instanceof \RecursiveIteratorIterator) && (!$proto instanceof \Serializable && !method_exists($proto, '__wakeup') && (\PHP_VERSION_ID < 70400 || !method_exists($class, '__unserialize')))) { + throw new NotInstantiableTypeException($class); + } + + $cloneable = $reflector->isCloneable() && !$reflector->hasMethod('__clone'); + } + + self::$cloneable[$class] = $cloneable; + self::$instantiableWithoutConstructor[$class] = $instantiableWithoutConstructor; + self::$prototypes[$class] = $proto; + + if ($proto instanceof \Throwable) { + static $setTrace; + + if (null === $setTrace) { + $setTrace = [ + new \ReflectionProperty(\Error::class, 'trace'), + new \ReflectionProperty(\Exception::class, 'trace'), + ]; + $setTrace[0]->setAccessible(true); + $setTrace[1]->setAccessible(true); + $setTrace[0] = \Closure::fromCallable([$setTrace[0], 'setValue']); + $setTrace[1] = \Closure::fromCallable([$setTrace[1], 'setValue']); + } + + $setTrace[$proto instanceof \Exception]($proto, []); + } + + return self::$reflectors[$class] = $reflector; + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/var-exporter/Internal/Values.php b/addons/weliam_smartcity/vendor/symfony/var-exporter/Internal/Values.php new file mode 100644 index 0000000..21ae04e --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/var-exporter/Internal/Values.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarExporter\Internal; + +/** + * @author Nicolas Grekas + * + * @internal + */ +class Values +{ + public $values; + + public function __construct(array $values) + { + $this->values = $values; + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/var-exporter/LICENSE b/addons/weliam_smartcity/vendor/symfony/var-exporter/LICENSE new file mode 100644 index 0000000..3f853aa --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/var-exporter/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2018-2019 Fabien Potencier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/addons/weliam_smartcity/vendor/symfony/var-exporter/README.md b/addons/weliam_smartcity/vendor/symfony/var-exporter/README.md new file mode 100644 index 0000000..bb13960 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/var-exporter/README.md @@ -0,0 +1,38 @@ +VarExporter Component +===================== + +The VarExporter component allows exporting any serializable PHP data structure to +plain PHP code. While doing so, it preserves all the semantics associated with +the serialization mechanism of PHP (`__wakeup`, `__sleep`, `Serializable`, +`__serialize`, `__unserialize`). + +It also provides an instantiator that allows creating and populating objects +without calling their constructor nor any other methods. + +The reason to use this component *vs* `serialize()` or +[igbinary](https://github.com/igbinary/igbinary) is performance: thanks to +OPcache, the resulting code is significantly faster and more memory efficient +than using `unserialize()` or `igbinary_unserialize()`. + +Unlike `var_export()`, this works on any serializable PHP value. + +It also provides a few improvements over `var_export()`/`serialize()`: + + * the output is PSR-2 compatible; + * the output can be re-indented without messing up with `\r` or `\n` in the data + * missing classes throw a `ClassNotFoundException` instead of being unserialized to + `PHP_Incomplete_Class` objects; + * references involving `SplObjectStorage`, `ArrayObject` or `ArrayIterator` + instances are preserved; + * `Reflection*`, `IteratorIterator` and `RecursiveIteratorIterator` classes + throw an exception when being serialized (their unserialized version is broken + anyway, see https://bugs.php.net/76737). + +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/var_exporter.html) + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/abstract-parent.php b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/abstract-parent.php new file mode 100644 index 0000000..df6a067 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/abstract-parent.php @@ -0,0 +1,20 @@ + [ + 'foo' => [ + 123, + ], + 'bar' => [ + 234, + ], + ], + ], + $o[0], + [] +); diff --git a/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/array-iterator-legacy.php b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/array-iterator-legacy.php new file mode 100644 index 0000000..c595733 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/array-iterator-legacy.php @@ -0,0 +1,22 @@ + [ + "\0" => [ + [ + [ + 123, + ], + 1, + ], + ], + ], + ], + $o[0], + [] +); diff --git a/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/array-iterator.php b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/array-iterator.php new file mode 100644 index 0000000..ed4df00 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/array-iterator.php @@ -0,0 +1,19 @@ + [ + "\0" => [ + [ + [ + 234, + ], + 1, + ], + ], + ], + ], + $o[0], + [] +); diff --git a/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/array-object-custom.php b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/array-object-custom.php new file mode 100644 index 0000000..530f0d1 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/array-object-custom.php @@ -0,0 +1,21 @@ + 123, + ], + ], + ] +); diff --git a/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/array-object-legacy.php b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/array-object-legacy.php new file mode 100644 index 0000000..a461c6e --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/array-object-legacy.php @@ -0,0 +1,29 @@ + [ + "\0" => [ + [ + [ + 1, + $o[0], + ], + 0, + ], + ], + ], + 'stdClass' => [ + 'foo' => [ + $o[1], + ], + ], + ], + $o[0], + [] +); diff --git a/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/array-object.php b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/array-object.php new file mode 100644 index 0000000..e2f349e --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/array-object.php @@ -0,0 +1,28 @@ + $o[1], + ], + ], + -1 => [ + 0, + [], + [], + ], + ] +); diff --git a/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/bool.php b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/bool.php new file mode 100644 index 0000000..438d99e --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/bool.php @@ -0,0 +1,3 @@ + [ + 'date' => [ + '1970-01-01 00:00:00.000000', + ], + 'timezone_type' => [ + 1, + ], + 'timezone' => [ + '+00:00', + ], + ], + ], + $o[0], + [ + 1 => 0, + ] +); diff --git a/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/error.php b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/error.php new file mode 100644 index 0000000..1362d0e --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/error.php @@ -0,0 +1,30 @@ + [ + 'file' => [ + \dirname(__DIR__).\DIRECTORY_SEPARATOR.'VarExporterTest.php', + ], + 'line' => [ + 234, + ], + ], + 'Error' => [ + 'trace' => [ + [ + 'file' => \dirname(__DIR__).\DIRECTORY_SEPARATOR.'VarExporterTest.php', + 'line' => 123, + ], + ], + ], + ], + $o[0], + [ + 1 => 0, + ] +); diff --git a/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/external-references.php b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/external-references.php new file mode 100644 index 0000000..0405b59 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/external-references.php @@ -0,0 +1,7 @@ + [ + 'file' => [ + \dirname(__DIR__).\DIRECTORY_SEPARATOR.'VarExporterTest.php', + ], + 'line' => [ + 123, + ], + ], + 'Error' => [ + 'trace' => [ + [], + ], + ], + ], + $o[0], + [ + 1 => 0, + ] +); diff --git a/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/final-error.php b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/final-error.php new file mode 100644 index 0000000..b2e7299 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/final-error.php @@ -0,0 +1,27 @@ + [ + 'file' => [ + \dirname(__DIR__).\DIRECTORY_SEPARATOR.'VarExporterTest.php', + ], + 'line' => [ + 123, + ], + ], + 'Error' => [ + 'trace' => [ + [], + ], + ], + ], + $o[0], + [ + 1 => 0, + ] +); diff --git a/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/final-stdclass.php b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/final-stdclass.php new file mode 100644 index 0000000..335e009 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/final-stdclass.php @@ -0,0 +1,11 @@ + 'B'."\r" + .'C'."\n" + ."\n", +]; diff --git a/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/partially-indexed-array.php b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/partially-indexed-array.php new file mode 100644 index 0000000..647aa7e --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/partially-indexed-array.php @@ -0,0 +1,8 @@ + true, + 1 => true, + 2 => true, + true, +]; diff --git a/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/php74-serializable.php b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/php74-serializable.php new file mode 100644 index 0000000..06cfac1 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/php74-serializable.php @@ -0,0 +1,16 @@ + [ + 'prop' => [ + 'bar', + ], + ], + ], + $o[0], + [] +); diff --git a/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/private.php b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/private.php new file mode 100644 index 0000000..a9e2841 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/private.php @@ -0,0 +1,26 @@ + [ + 'prot' => [ + 123, + 123, + ], + 'priv' => [ + 234, + 234, + ], + ], + ], + [ + $o[0], + $o[1], + ], + [] +); diff --git a/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/serializable.php b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/serializable.php new file mode 100644 index 0000000..fcf3227 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/serializable.php @@ -0,0 +1,14 @@ + [ + "\0" => [ + [ + $o[1], + 345, + ], + ], + ], + ], + $o[0], + [] +); diff --git a/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/spl-object-storage.php b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/spl-object-storage.php new file mode 100644 index 0000000..023a75f --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/spl-object-storage.php @@ -0,0 +1,20 @@ + [ + 'good' => [ + 'night', + ], + ], + ], + $o[0], + [] +); diff --git a/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/wakeup-refl.php b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/wakeup-refl.php new file mode 100644 index 0000000..1fee610 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/wakeup-refl.php @@ -0,0 +1,13 @@ + 0, + ] +); diff --git a/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/wakeup.php b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/wakeup.php new file mode 100644 index 0000000..89d4ceb --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/Fixtures/wakeup.php @@ -0,0 +1,25 @@ + [ + 'sub' => [ + $o[1], + 123, + ], + 'baz' => [ + 1 => 123, + ], + ], + ], + $o[0], + [ + 1 => 1, + 0, + ] +); diff --git a/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/InstantiatorTest.php b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/InstantiatorTest.php new file mode 100644 index 0000000..3da6023 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/InstantiatorTest.php @@ -0,0 +1,73 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarExporter\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\VarExporter\Instantiator; + +class InstantiatorTest extends TestCase +{ + public function testNotFoundClass() + { + $this->expectException('Symfony\Component\VarExporter\Exception\ClassNotFoundException'); + $this->expectExceptionMessage('Class "SomeNotExistingClass" not found.'); + Instantiator::instantiate('SomeNotExistingClass'); + } + + /** + * @dataProvider provideFailingInstantiation + */ + public function testFailingInstantiation(string $class) + { + $this->expectException('Symfony\Component\VarExporter\Exception\NotInstantiableTypeException'); + $this->expectExceptionMessageRegExp('/Type ".*" is not instantiable\./'); + Instantiator::instantiate($class); + } + + public function provideFailingInstantiation() + { + yield ['ReflectionClass']; + yield ['SplHeap']; + yield ['Throwable']; + yield ['Closure']; + yield ['SplFileInfo']; + } + + public function testInstantiate() + { + $this->assertEquals((object) ['p' => 123], Instantiator::instantiate('stdClass', ['p' => 123])); + $this->assertEquals((object) ['p' => 123], Instantiator::instantiate('STDcLASS', ['p' => 123])); + $this->assertEquals(new \ArrayObject([123]), Instantiator::instantiate(\ArrayObject::class, ["\0" => [[123]]])); + + $expected = [ + "\0".__NAMESPACE__."\Bar\0priv" => 123, + "\0".__NAMESPACE__."\Foo\0priv" => 234, + ]; + + $this->assertSame($expected, (array) Instantiator::instantiate(Bar::class, ['priv' => 123], [Foo::class => ['priv' => 234]])); + + $e = Instantiator::instantiate('Exception', ['foo' => 123, 'trace' => [234]]); + + $this->assertSame(123, $e->foo); + $this->assertSame([234], $e->getTrace()); + } +} + +class Foo +{ + private $priv; +} + +class Bar extends Foo +{ + private $priv; +} diff --git a/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/VarExporterTest.php b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/VarExporterTest.php new file mode 100644 index 0000000..d80c285 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/var-exporter/Tests/VarExporterTest.php @@ -0,0 +1,427 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarExporter\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\VarDumper\Test\VarDumperTestTrait; +use Symfony\Component\VarExporter\Internal\Registry; +use Symfony\Component\VarExporter\VarExporter; + +class VarExporterTest extends TestCase +{ + use VarDumperTestTrait; + + public function testPhpIncompleteClassesAreForbidden() + { + $this->expectException('Symfony\Component\VarExporter\Exception\ClassNotFoundException'); + $this->expectExceptionMessage('Class "SomeNotExistingClass" not found.'); + $unserializeCallback = ini_set('unserialize_callback_func', 'var_dump'); + try { + Registry::unserialize([], ['O:20:"SomeNotExistingClass":0:{}']); + } finally { + $this->assertSame('var_dump', ini_set('unserialize_callback_func', $unserializeCallback)); + } + } + + /** + * @dataProvider provideFailingSerialization + */ + public function testFailingSerialization($value) + { + $this->expectException('Symfony\Component\VarExporter\Exception\NotInstantiableTypeException'); + $this->expectExceptionMessageRegExp('/Type ".*" is not instantiable\./'); + $expectedDump = $this->getDump($value); + try { + VarExporter::export($value); + } finally { + $this->assertDumpEquals(rtrim($expectedDump), $value); + } + } + + public function provideFailingSerialization() + { + yield [hash_init('md5')]; + yield [new \ReflectionClass('stdClass')]; + yield [(new \ReflectionFunction(function (): int {}))->getReturnType()]; + yield [new \ReflectionGenerator((function () { yield 123; })())]; + yield [function () {}]; + yield [function () { yield 123; }]; + yield [new \SplFileInfo(__FILE__)]; + yield [$h = fopen(__FILE__, 'r')]; + yield [[$h]]; + + $a = new class() { + }; + + yield [$a]; + + $a = [null, $h]; + $a[0] = &$a; + + yield [$a]; + } + + /** + * @dataProvider provideExport + */ + public function testExport(string $testName, $value, bool $staticValueExpected = false) + { + $dumpedValue = $this->getDump($value); + $isStaticValue = true; + $marshalledValue = VarExporter::export($value, $isStaticValue); + + $this->assertSame($staticValueExpected, $isStaticValue); + if ('var-on-sleep' !== $testName && 'php74-serializable' !== $testName) { + $this->assertDumpEquals($dumpedValue, $value); + } + + $dump = "assertStringEqualsFile($fixtureFile, $dump); + + if ('incomplete-class' === $testName || 'external-references' === $testName) { + return; + } + $marshalledValue = include $fixtureFile; + + if (!$isStaticValue) { + if ($value instanceof MyWakeup) { + $value->bis = null; + } + $this->assertDumpEquals($value, $marshalledValue); + } else { + $this->assertSame($value, $marshalledValue); + } + } + + public function provideExport() + { + yield ['multiline-string', ["\0\0\r\nA" => "B\rC\n\n"], true]; + + yield ['bool', true, true]; + yield ['simple-array', [123, ['abc']], true]; + yield ['partially-indexed-array', [5 => true, 1 => true, 2 => true, 6 => true], true]; + yield ['datetime', \DateTime::createFromFormat('U', 0)]; + + $value = new \ArrayObject(); + $value[0] = 1; + $value->foo = new \ArrayObject(); + $value[1] = $value; + + yield ['array-object', $value]; + + yield ['array-iterator', new \ArrayIterator([123], 1)]; + yield ['array-object-custom', new MyArrayObject([234])]; + + $value = new MySerializable(); + + yield ['serializable', [$value, $value]]; + + $value = new MyWakeup(); + $value->sub = new MyWakeup(); + $value->sub->sub = 123; + $value->sub->bis = 123; + $value->sub->baz = 123; + + yield ['wakeup', $value]; + + yield ['clone', [new MyCloneable(), new MyNotCloneable()]]; + + yield ['private', [new MyPrivateValue(123, 234), new MyPrivateChildValue(123, 234)]]; + + $value = new \SplObjectStorage(); + $value[new \stdClass()] = 345; + + yield ['spl-object-storage', $value]; + + yield ['incomplete-class', unserialize('O:20:"SomeNotExistingClass":0:{}')]; + + $value = [(object) []]; + $value[1] = &$value[0]; + $value[2] = $value[0]; + + yield ['hard-references', $value]; + + $value = []; + $value[0] = &$value; + + yield ['hard-references-recursive', $value]; + + static $value = [123]; + + yield ['external-references', [&$value], true]; + + unset($value); + + $value = new \Error(); + + $rt = new \ReflectionProperty('Error', 'trace'); + $rt->setAccessible(true); + $rt->setValue($value, ['file' => __FILE__, 'line' => 123]); + + $rl = new \ReflectionProperty('Error', 'line'); + $rl->setAccessible(true); + $rl->setValue($value, 234); + + yield ['error', $value]; + + yield ['var-on-sleep', new GoodNight()]; + + $value = new FinalError(false); + $rt->setValue($value, []); + $rl->setValue($value, 123); + + yield ['final-error', $value]; + + yield ['final-array-iterator', new FinalArrayIterator()]; + + yield ['final-stdclass', new FinalStdClass()]; + + $value = new MyWakeup(); + $value->bis = new \ReflectionClass($value); + + yield ['wakeup-refl', $value]; + + yield ['abstract-parent', new ConcreteClass()]; + + yield ['foo-serializable', new FooSerializable('bar')]; + + yield ['private-constructor', PrivateConstructor::create('bar')]; + + yield ['php74-serializable', new Php74Serializable()]; + } +} + +class MySerializable implements \Serializable +{ + public function serialize() + { + return '123'; + } + + public function unserialize($data) + { + // no-op + } +} + +class MyWakeup +{ + public $sub; + public $bis; + public $baz; + public $def = 234; + + public function __sleep() + { + return ['sub', 'baz']; + } + + public function __wakeup() + { + if (123 === $this->sub) { + $this->bis = 123; + $this->baz = 123; + } + } +} + +class MyCloneable +{ + public function __clone() + { + throw new \Exception('__clone should never be called'); + } +} + +class MyNotCloneable +{ + private function __clone() + { + throw new \Exception('__clone should never be called'); + } +} + +class PrivateConstructor +{ + public $prop; + + public static function create($prop): self + { + return new self($prop); + } + + private function __construct($prop) + { + $this->prop = $prop; + } +} + +class MyPrivateValue +{ + protected $prot; + private $priv; + + public function __construct($prot, $priv) + { + $this->prot = $prot; + $this->priv = $priv; + } +} + +class MyPrivateChildValue extends MyPrivateValue +{ +} + +class MyArrayObject extends \ArrayObject +{ + private $unused = 123; + + public function __construct(array $array) + { + parent::__construct($array, 1); + } + + public function setFlags($flags) + { + throw new \BadMethodCallException('Calling MyArrayObject::setFlags() is forbidden'); + } +} + +class GoodNight +{ + public function __sleep() + { + $this->good = 'night'; + + return ['good']; + } +} + +final class FinalError extends \Error +{ + public function __construct(bool $throw = true) + { + if ($throw) { + throw new \BadMethodCallException('Should not be called.'); + } + } +} + +final class FinalArrayIterator extends \ArrayIterator +{ + public function serialize() + { + return serialize([123, parent::serialize()]); + } + + public function unserialize($data) + { + if ('' === $data) { + throw new \InvalidArgumentException('Serialized data is empty.'); + } + list(, $data) = unserialize($data); + parent::unserialize($data); + } +} + +final class FinalStdClass extends \stdClass +{ + public function __clone() + { + throw new \BadMethodCallException('Should not be called.'); + } +} + +abstract class AbstractClass +{ + protected $foo; + private $bar; + + protected function setBar($bar) + { + $this->bar = $bar; + } +} + +class ConcreteClass extends AbstractClass +{ + public function __construct() + { + $this->foo = 123; + $this->setBar(234); + } +} + +class FooSerializable implements \Serializable +{ + private $foo; + + public function __construct(string $foo) + { + $this->foo = $foo; + } + + public function getFoo(): string + { + return $this->foo; + } + + public function serialize(): string + { + return serialize([$this->getFoo()]); + } + + public function unserialize($str) + { + list($this->foo) = unserialize($str); + } +} + +class Php74Serializable implements \Serializable +{ + public function __serialize() + { + return [$this->foo = new \stdClass()]; + } + + public function __unserialize(array $data) + { + list($this->foo) = $data; + } + + public function __sleep() + { + throw new \BadMethodCallException(); + } + + public function __wakeup() + { + throw new \BadMethodCallException(); + } + + public function serialize() + { + throw new \BadMethodCallException(); + } + + public function unserialize($ser) + { + throw new \BadMethodCallException(); + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/var-exporter/VarExporter.php b/addons/weliam_smartcity/vendor/symfony/var-exporter/VarExporter.php new file mode 100644 index 0000000..da9a8d4 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/var-exporter/VarExporter.php @@ -0,0 +1,114 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarExporter; + +use Symfony\Component\VarExporter\Exception\ExceptionInterface; +use Symfony\Component\VarExporter\Internal\Exporter; +use Symfony\Component\VarExporter\Internal\Hydrator; +use Symfony\Component\VarExporter\Internal\Registry; +use Symfony\Component\VarExporter\Internal\Values; + +/** + * Exports serializable PHP values to PHP code. + * + * VarExporter allows serializing PHP data structures to plain PHP code (like var_export()) + * while preserving all the semantics associated with serialize() (unlike var_export()). + * + * By leveraging OPcache, the generated PHP code is faster than doing the same with unserialize(). + * + * @author Nicolas Grekas + */ +final class VarExporter +{ + /** + * Exports a serializable PHP value to PHP code. + * + * @param mixed $value The value to export + * @param bool &$isStaticValue Set to true after execution if the provided value is static, false otherwise + * + * @return string The value exported as PHP code + * + * @throws ExceptionInterface When the provided value cannot be serialized + */ + public static function export($value, bool &$isStaticValue = null): string + { + $isStaticValue = true; + + if (!\is_object($value) && !(\is_array($value) && $value) && !$value instanceof \__PHP_Incomplete_Class && !\is_resource($value)) { + return Exporter::export($value); + } + + $objectsPool = new \SplObjectStorage(); + $refsPool = []; + $objectsCount = 0; + + try { + $value = Exporter::prepare([$value], $objectsPool, $refsPool, $objectsCount, $isStaticValue)[0]; + } finally { + $references = []; + foreach ($refsPool as $i => $v) { + if ($v[0]->count) { + $references[1 + $i] = $v[2]; + } + $v[0] = $v[1]; + } + } + + if ($isStaticValue) { + return Exporter::export($value); + } + + $classes = []; + $values = []; + $states = []; + foreach ($objectsPool as $i => $v) { + list(, $classes[], $values[], $wakeup) = $objectsPool[$v]; + if (0 < $wakeup) { + $states[$wakeup] = $i; + } elseif (0 > $wakeup) { + $states[-$wakeup] = [$i, array_pop($values)]; + $values[] = []; + } + } + ksort($states); + + $wakeups = [null]; + foreach ($states as $k => $v) { + if (\is_array($v)) { + $wakeups[-$v[0]] = $v[1]; + } else { + $wakeups[] = $v; + } + } + + if (null === $wakeups[0]) { + unset($wakeups[0]); + } + + $properties = []; + foreach ($values as $i => $vars) { + foreach ($vars as $class => $values) { + foreach ($values as $name => $v) { + $properties[$class][$name][$i] = $v; + } + } + } + + if ($classes || $references) { + $value = new Hydrator(new Registry($classes), $references ? new Values($references) : null, $properties, $value, $wakeups); + } else { + $isStaticValue = true; + } + + return Exporter::export($value); + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/var-exporter/composer.json b/addons/weliam_smartcity/vendor/symfony/var-exporter/composer.json new file mode 100644 index 0000000..3d543df --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/var-exporter/composer.json @@ -0,0 +1,36 @@ +{ + "name": "symfony/var-exporter", + "type": "library", + "description": "A blend of var_export() + serialize() to turn any serializable data structure to plain PHP code", + "keywords": ["export", "serialize", "instantiate", "hydrate", "construct", "clone"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": "^7.1.3" + }, + "require-dev": { + "symfony/var-dumper": "^4.1.1" + }, + "autoload": { + "psr-4": { "Symfony\\Component\\VarExporter\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "4.3-dev" + } + } +} diff --git a/addons/weliam_smartcity/vendor/symfony/var-exporter/phpunit.xml.dist b/addons/weliam_smartcity/vendor/symfony/var-exporter/phpunit.xml.dist new file mode 100644 index 0000000..96e2110 --- /dev/null +++ b/addons/weliam_smartcity/vendor/symfony/var-exporter/phpunit.xml.dist @@ -0,0 +1,31 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Resources + ./Tests + ./vendor + + + + diff --git a/addons/weliam_smartcity/version.php b/addons/weliam_smartcity/version.php new file mode 100644 index 0000000..7121cf9 --- /dev/null +++ b/addons/weliam_smartcity/version.php @@ -0,0 +1 @@ +